1,034 Posted Topics
Re: Shouldn't these be parsed: [code] Mort = answer.getText(); Int = answera.getText(); T = answerb.getText(); MonthPay.setText( "$" + (Int - (Mort * Int * T)) / (T*12)); [/code] T = Integer.parseInt(answerb.getText()); Also, don't you want to use doubles? | |
Re: I don't see any code taking input. Look into the bufferedreader. | |
Re: Applets extend JApplet not JFrame ;) | |
Re: Can you not just create an AudioClip object with the corresponding URL and then call the play() method on it? | |
Re: If you're working with strings this might work (not tested), but it looks like dragons solution is probably what your looking for. [code] bool find_string(ifstream& file, const string& search) { string line = " "; while( getline(file, line, '\n') ) { if (line == search) { return true; } } … | |
Re: Few possibilities: You don't have the html to run the applet. The applet has one or more .class files and you don't have them all. There's security contained in the applet(for example, checking to see that it is run from the makers domain). I would say you don't have all … | |
Re: What about making it to where we can have our own custom titles? | |
Re: java has a tutorial on it: [url]http://java.sun.com/applets/jdk/1.4/demo/applets/WireFrame/example2.html[/url] | |
Re: So what's your question? I see nothing but a bunch of code in need of a few band aids, but no question. | |
![]() | Re: You know there's a UI manager, right? Programs on windows platform should have the windows L&F, and so on. Where you get very, very, very ugly I don't know. Maybe it's just your design/layout/colors. |
Re: First off, I would suggest adding some tab characters "\t" instead of explicitly adding all the white spaces in. It makes your code really hard to read like it is. | |
Re: I'm not too sure about this. It could be a thread timing out, or something blocking it. You'll probably have to wait until someone smarter than me posts. | |
Re: [QUOTE=opfamily55] I am learning JavaScript and am lost. [/QUOTE] Yes, you are lost. This is a JSP forum, not javascript. ;) | |
Re: [QUOTE=frack78]I have written a binary search algorithm in java. I have a statement that when the search key is found it is printed to a terminal window. This statement when when called just keeps printing over and over and i cant figure out why :sad: . Can any one help? … | |
| |
| |
Re: Take out the break statements if you want all them to execute, but that probably means your logic is flawed. | |
Re: Loop not written properly. [Probably an infinite loop] for (int i=10; i>=0; i++) { } That would be an example. | |
Re: extensions maybe? Binary is suppose to be .dat Test is .txt or .text | |
Re: I don't think it would make sense to 'link' the classes, or at least the way you have written them it doesn't make sense. From what I can see, you need to make the 'CurrencyConvert' class nothing but methods and possibly aggregate that class into the Gift class. With what … | |
Re: What do you mean from a different context? To close: System.exit(0); To open: Just create an instance | |
Re: I'd say no, but there's no way to tell. The best thing to do is ask your teacher/professor. You can always do both and that way you won't have to worry. | |
![]() | Re: Do you know how to create one via the commandline? ![]() |
Re: Do you mean a tree? ;) I'd say use a map or something along those lines. If there's a java equivalent of the c++ multimap, then go that route. | |
Re: I'd say it's platform independant. Most platforms have a lock on files that are in use, and you can't delete them: [code] #include <cstdlib> #include <cstdio> int main(int argc, char * * argv) { remove(argv[0]); return EXIT_SUCCESS; } [/code] If that doesn't work, then as someone already mentioned, then it's … | |
Re: If I remember right, the vector class is very slow when inserting elements to the front, or any place except the back. So, if there is a method push_front() then you probably shouldn't use it. | |
Re: Thanks guys ;) If anyone loves me then just send me a gift($$$$) via paypal. | |
Re: If I understand correctly, you can set the visibility: Component.setVisible(false); Or even better, set the editability: Component.setEditable(false); | |
Re: You could simply loop through I guess: [code] bool anyNegatives(int nums[], int size) { for (int i=0; i<size; ++i) { if (nums[i] < 0) { return true; } } return false; } [/code] Pretty simple. If you encounter one, then you can break. | |
Re: [QUOTE=catherine1001] But guys Java, J2EE ,.Net is currently on demand. [/QUOTE] I'm sure ALL programmers who know Java, just don't know Java. | |
Re: Alienware ALL the way. I wouldn't buy anything else. I have a Dell which is had nothing but SERIOUS problems ever since I bought it. Their tech support is decent under warranty, but the quality is crap. We actually have two of the same Dell laptops. One with major issues, … | |
Re: I'd personally rather use setLocation(int x, int y). I like using the setSize() property for the overall container and using setBounds(int,int,int,int) for inner containers. | |
Re: I don't know much, but I think your best bet would be consumer credit counsiling to see what they say. If you do think about filing bankrupcy, then at least take a look into the chapter 13 plan. Not sure if that will help or not. I don't know much … | |
Re: What do you mean use a data file, text file and the other stuff? An interface is implemented like this: [code] class Test implements MyStackInterface { //now it must override the methods } [/code] | |
Re: Pretty cool. I actually started writing a console connect four game in c++ this morning. I'm done with it, but it's only two player. Shortly I'll be working on it for human vs computer. | |
Re: Never heard of a vaw file? If you mean raw, then it can't be much more than using an File object, FileOutputStream, BufferedReader, DataInputStream, or something along those lines. | |
Re: Here's an excellent article on tuning the GC: [url]http://java.sun.com/docs/hotspot/gc1.4.2/[/url] | |
Re: Simple global constants should do. | |
Re: Probably whatever is the most efficent...Like if you have a small program that could be accomplished with an iterative loop, it would NOT be good practice to use recursion. | |
Re: Do you mind telling us the steps you've taken? It would be easier to diagnose a problem that way. | |
Re: [QUOTE=Gargol]Are you talking about Java?[/QUOTE] Kathy Sierra and Bert Bates book is the best in my opinion. You read that about 2 or 3 times and you'll make at least 75 or 80. | |
Re: Create a style with some imageicons and whatever else you need in html. | |
Re: [QUOTE=tbrinkman]yes but it is a java problem ;)[/QUOTE] Ummmm.....Are you trying to use the "new" construct to instantiate an abstract class???? The root cause error should give it away. |
The End.