4,084 Posted Topics
Re: waw .. an entire netbeans generated gui... personally, I would try to seperate your business from gui. next to: ehm, what's the problem? doing it at the same time? it's just making a method call on the right position if you write your code logical. | |
Re: if you want to create an .exe here's a lead to follow: don't use Java. | |
Re: sure, why not? if for each class you write a method that returns the xml code it should represent, for instance, and call that from within the main class. http://docs.oracle.com/javase/tutorial/jaxp/xslt/writingDom.html as for you question of the same file: sure, if you code it that way. | |
Re: have you tried it? anyway, If, with capital I and Then are not from Java, so no. for a double condition, try either nested ifs: if ( condition1 ){ if ( condition2 ){ // your code } } or, put the conditions in one statement: if ( condition1 && condition2 … | |
Re: you would 've done well to first learn the basics of persistence (either jdbc, hibernate, jpa, ... ) before trying to do an entire application. just the simple insert - edit - delete statements on their own. I would also have suggested to learn to use servlets before trying to … | |
Re: the entire point of 'liking' a page, is so people can see that you like the page. why like anything if nobody is allowed to know? why would there be a functionality to undo the default functionality, and remove the entire goal of it? | |
Re: help you with what, exactly? if you have an unrelated question, you should have started a new thread, not revive a thread that hasn't been active for three years (even if it was related, which it is not, you should have started a new thread). if the question is: "can … | |
Re: the thread is marked solved, but I don't see any solution here, so I'll just add a link to the (in my eyes) best solution there is: [decimal to binary](http://docs.oracle.com/javase/7/docs/api/java/lang/Integer.html#toBinaryString(int)) | |
Re: did you add the right libraries to your (project's) path? anyway ... are you sure you want to show code like thát to a senior developer? | |
Re: this is not really a Java question, it's your logic that doesn't make much sense. percent gain or loss, against what? what you originally paid? so: calculate your original cost (shares * purchase1) = originalCost next, what you earned: (shares * selling1) = earning earning - originalCost => amountGainedOrLost percentGain … | |
Re: not sure what you're trying to do there. why do you need that second loop? anyway, it takes the last, because you always overwrite the value. try this: description.setText("Word not found."); for ( int i = 0; i < questions.length; i++){ if ( word1.equals(questions[i])){ description.setText(answers[i]); break; } | |
Re: if you really are just starting, you are not doing yourself any favours of starting immediately with an IDE. just start of with notepad(++) and the command prompt. you'll learn how to code, rather than to follow auto-complete suggestions, and it'll be easier to learn to use online documentation (since … | |
Re: I guess you can change the character set used. | |
Re: well ... first of all, you shouldn't use `o.name` you should use mutators (get/set methods) to get that. name -> like this, is the name of the current instance. it's the same as if you had said: this.name o.name (what would better be o.getName()) takes the name of the o … | |
Re: all you need is a call to the [split method](http://docs.oracle.com/javase/7/docs/api/java/lang/String.html#split(java.lang.String)) of the String class. it's pretty self-explanatory. | |
Re: whether it is desirable or not, is for you to decide (or your client/professor/employer) | |
Re: to win a war is no victory. And ending a battle to save an Empire is no defeat. (noH QapmeH wo' Qaw'lu'chugh yay chavbe'lu', 'ej wo' choqmeH may' DoHlu'chugh lujbe'lu') --> To deploy code on production is a fail. Success lies in endless debugging. | |
Re: sk8ergirl: it's not for beginners. he probably just never did much work during his courses because > i dont want to carry this subject :3 no doubt everything he needs is in his coursenotes and his exercises during the course (if he had bothered making those). it seems he's finally … | |
Re: actually: `while (ans == "yes");` might work in some cases.. but it's not recommended, nor reliable. for Objects, the == operator doesn't compare the values of the two objects, it'll rather compare their references, and, even though the values might be the same for two Objects, that doesn't mean the … | |
Re: [This](http://stackoverflow.com/questions/5459701/how-can-i-watermark-an-image-in-java) might help you with that. | |
Re: you are giving a pretty vague description. does p have a value? what is lookUp's value? if the equals without the ! gives "nothing", it means the values aren't identical. try and printing out the values of aa and lookUp each time you check that. maybe that 'll give the … | |
Re: you instantiate the childclass and call the getText method, how else? | |
Re: how about looping over st and printing it's elements, instead of printing st itself? | |
Re: that's because you made a logical error: here is the total reach of the while loop in which you show that: while (num1<1 || num1>9999) { JOptionPane.showInputDialog("The input number is not positive. Please enter a positive integer (1-9999):"); num1=Integer.parseInt(string_in1); } it may look correct, but you have forgotten to assign … | |
Re: ehm ... just a small remark: you don't actually 'connect a JList to a DB', you just show the results in it. I'm not exactly clear on what it is you are looking for, can you be a bit more precise? | |
Re: help with what? you have everything you need. or don't you know the logic to calculate an average? | |
Re: " its just not happening! " yah ... this isn't really helping. is there a stacktrace printed? how do you know " i's not happening "? | |
Re: too many to mention, so I'll just give a few (both old <aaaah, childhood memories>, and more recent) Buiten de Zone (Belgian youth series of the nineties. still brilliant :) ) Sledge Hammer Dilbert - animated series House MD (allthough the last seasons ... ) Bones Black Adder (I have … | |
Re: yes there is, but if you want to actually learn Java, you shouldn't go for that. | |
Re: how can file have a next? you haven't even initialized file, you just declared it to be null. so, with: `file.hasNext()` you are calling a method on null. that is what causes the NullPointerException. if this is not your issue, please provide the correct code and stacktrace. | |
Re: for the first part: have him type it, have him select a folder on his hd. for the second, use the methods that are in the [File](http://docs.oracle.com/javase/7/docs/api/java/io/File.html) class | |
Re: as far as I know: not. why would you want to? besides, what do you mean 'executed on desktop'? you mean the frequency in which you click the shortcuts on the desktop? | |
Re: read the entire error message. it'll tell you exactly on which line of which class that exception is thrown. learning to read stacktraces is pretty important if you want to work with more complicated projects. my guess, your problem is right here: CustomerRegister customers; VehicleRegister vehicles; you never instantiate these. … | |
Re: no. to many things to consider. firstly, whereas a lot of people are afraid to die, my "don't want to die" thoughts are more related to not knowing all the things I'll miss in the future. let's say there is this one song, a perfect song, great melody, lyrics, thoughts, … | |
Re: selvampti .. is there any particular reason you chose to revive this thread? no new answer, no new question .... I'm puzzled as to your thoughts here ... | |
Re: he doesn't really need to pass the int to the method, since it's a variable on class level. he does however may not forget to call the SomeExec method. | |
Re: pepee, this is not a "gimme codez" forum. not to mention it's pretty pointless to revive a three year old thread to request it. | |
Re: I've indeed noticed the same issue about trying to reply through my gmail address. it's indeed a nice feature, but so is disabling it: by just visiting the forum I can estimate based on the title whether I'll be able to help, so won't get notices from each thread created. | |
Re: Kevin: not sure what you're trying to do here, but the question was answered six years ago. might be that the sollution was already given. | |
Re: ehm ... yes. the one will work on a 32 bits operating system, while the other one will work on a 64 bits operating system. | |
Re: aaaaaaaaaaaaaand ... what exactly is your question? if it's a request to do your homework .. no. I suggest you take a look at the [community rules](http://www.daniweb.com/community/rules), especially the one that states: > Do provide evidence of having done some work yourself if posting questions from school or work assignments … | |
Re: I'm impressed. you have a NullPointerException thrown on a line of code that doesn't seem to exist .... line 180 in the ShirtPanel file, inside the ShirtListener class, but your file only seems to have 171 lines... in that actionPerformed method, have you checked whether `contentPane.getLayout();` returns null? | |
Re: there is no fool-proof system. the best way I can come up with: add a serial number. on run -> contact a webservice. if first run -> write datum (server datum - no cheating on the client side possible) verify licence to db if licence doesn't exist, quit application if … | |
Re: Dani: I think they are selling customized eStore applications, so most likely the target audience is small businesses. | |
Re: MikeWyatt: if there weren't, he wouldn't be able to get the image as blob from the db, now would he? just google 'write image as blob java'. that'll give you enough of examples/tutorials. but considering this is a different question, perhaps you should've started a new thread. | |
Re: why re-invent the wheel? there are already browsers who provide this functionality. what do you mean "I am unable to understand the logic"... you don't know how to technically do it? | |
Re: heey hoow no ... this is not a "do my homework forum". please read (and respect) the community rules. | |
Re: we hardly have any information on the product. it's like naming without knowing whether we are naming a boy, a girl, or even a person for that matter. |
The End.