1,034 Posted Topics
Re: Actually, with an interface I believe you can extend as many interfaces as you like. | |
Re: Dani, I think that's an excellent idea. It would surely make it easier to navigate and more likely for the 'confused' to post in the right spot. Also, it will make it look more active. Just my 200 bucks, but I think you have a good idea. | |
| |
Re: Well, you could write boolean methods like this: [code] boolean testInt(String s) { try { Integer.parseInt(s); } catch(Exception e) { return false; } return true; } [/code] or something like that. | |
Re: 1. Name this band: Smudge. 2. Who do the Eagles of Death Metal and Queens of the Stone Age have in common? 3. Name one DJ who used to work on pirate radio station Caroline. 4. Name one company which makes an mp3 player called the nano. 5. Name three … | |
Re: [QUOTE=bumsfeld]I would learn C++ to get used to an oops language. Java is simple lame version of C++ anyway![/QUOTE] And C++ is a lame version of C. :rolleyes: Why make comparisions when they have different purposes. | |
| |
Re: Here, add this code to the paint method: [code] g.drawString("DO YOUR OWN HOMEWORK",10,10); [/code] It's not hard. Keep track of the size multiply it by .25 and you got your new size. | |
Re: [QUOTE=seh1] 1. When the GUIs opens it opens so that I have to change the size manually to view it i.e. the toolbar appears. Is there a way I can get my program to set the size of my GUI so its a decent size when it opens on screen? … | |
Re: How many hosts have you tried? I would think you should be able to get a free webhost for that. I could be wrong though. | |
Re: What do you mean by computer movements? Please be more specific. | |
Re: This isn't an array: [code] int[] months= numOfYears[i]*12; //The variable used for user input for exact month information [/code] Shouldn't it be: int[] months= numOfYears[i*12]; | |
Re: What's the question? What problem are you having? Is there an error? | |
Okay, I can't find a thread that I posted to just yesterday and recieved an email showing a nice reply by Narue, but I deleted it. I can't find that thread! Was it deleted? If it was, Narue, can you explain the reason atoi() is bad and the better way … | |
Re: I think it's: [code] int x = atoi(char); [/code] Probably better ways, but that's how I do it. | |
Re: Only opened by your program? You can save something as a different extension, but other programs will be able to open it and probably easily decipher the contents, especially if it's just text. | |
Re: Shouldn't you be able to call the repaint() method of a specific frame? | |
Re: Check your layout manager. Maybe alter the gridbaglayout a little bit so it works. | |
Does anyone know of a place(online) that sells cool pc cases that have a lot of brackets for fans? Or a specific model which supports excellent cooling? | |
Re: Are you putting that in a try-catch clause? If so, what does it look like? | |
Re: You could always set the layout to null and set the bounds, but I don't know if that's a good idea or not...... That is, if you are talking about positioning components. | |
Re: [QUOTE=iamthwee]Does that mean the [COLOR=Lime]<syntax>[/COLOR] is allowed in java?[/QUOTE] Yes, it's called generics! I thought JW just told you that :confused: | |
Re: [QUOTE=iamthwee]Sorrie, my english is only meant to make sense to those below the middle thirties :lol: Maybe wen I get rid of my wretched cell fone I may B persuaded to communicate more eloquently.[/QUOTE] Welche Sprache ist das? | |
Re: Can clean up your language so we can understand you? If you are using swing set the default close operation. If you are using awt, then add a window adapter thing. | |
Re: What's the error message you are recieving(if any)? Also, Im too lazy to put that into a compiler and read through all the source, so please explain what it's doing that it's not suppose to in detail. | |
Re: What's it not doing? There's a chance it wont even show up because you extend a swing component, but yet you are using awt components? (ie: Panel, TextField, etc)... I've seen cases were it won't display because of this. | |
Re: I'd use whatever internal structure the specified object has... Why waste your time reinventing something already there? | |
Re: Couple of problems: 1) You don't state what the problem is 2) You don't set anything visible 3) Your global variables are public 4) You don't set the layout | |
Re: better than canvas.... If you want something just to draw on, then override the paint method. | |
Re: You never asked a question... What are you having problems with? What do you need help with? etc. | |
Re: [QUOTE=jack26][COLOR=Red][COLOR=Red][/COLOR] i am trying to past an image into my java program given the starting point and the ending point..,, gc.drawImage (m_image,0,50,120,15this); but its not working can you help me please[/QUOTE] Look at your last parameter. | |
Re: [QUOTE=jigvesh]well if the coding is not lengthy, can u plz post the codin for makin a frame the parent frame....i tried... [code] JFrame parent; parent=this; [/code] but i am supposed to write this in addactionlistener method.....and so it just doesnt work out[/QUOTE] [url]http://java.sun.com/docs/books/tutorial/uiswing/components/internalframe.html[/url] If you are lazy like me I … | |
![]() | Re: Do you have to create your own stack? If not, then java should provide one for you. I believe when you push something onto the stack it gets put at the top. So, all you have to do is loop through the stack and test whether the character you just … |
Re: You could add 32 or subtract 32 from the ascii value depending on whether it's lower or uppercase.... A simpler solution is creating a substring and calling the toUpperCase() method: String newString = (oldstring.substring(0,1)).toUpperCase(); NOTE: It's not tested so don't be suprised if that doesn't work. | |
Re: a = b? That's the only way I know of sharing references. | |
Re: Ahhh, geeezz. My first thought would be shoot them, but no, it has to be better. I would let them sit in jail with the biggest, strongest, gayest guys there. He would then be raped non stop until he was dead. | |
I have a matrix class which there are matrix objects. I want to call `.value(int,int)` directly on the matrix objects and set the internal 2d vector to the value on the right side of the equal sign. Here is what I want to do: new_matrix.value(row,col) = 0; Here is what … | |
Re: What are the values you are getting for 90 and 270? Shouldn't they both be 0 according to the unit circle? | |
Re: I wouldn't buy a radeon. It's simple, buy the best card you can get for your budget. Don't go less than a 256mb card, so that narrows it down to two. Check reviews and see which one you think. | |
Re: If you can use both, then choose which ever you like. But, if you decide to get a PC, don't get a Dell. I know you said you don't like them, but I was just reassuring you ;) Alienware would be my choice of a manufactured computer. Apple or PC.... … | |
Re: Loop through the string and create substrings or something: [code] for (int index=string.length-1; index>=0; --index) { System.out.println(string.substring(0,index) + "\n"); } [/code] I have no clue if that will work or not. | |
Re: First, you need to clean up your own english(the abbreviations ) so we can understand you. Then you need to show us what you've already done, and specifically what you're having trouble with. In the meantime, remember Java has a String class with many methods such as indexOf() and other … ![]() | |
I have a program that reads from a file, but for some reason it never reaches the end of the file or something, because the loop never ends. I put only 2 lines of text in the file, and a loop like this still ran infinite: [code] while (! my_file.eof()) … ![]() | |
I'm trying this: char info[50]; myfile.getline(info, sizeof(info) ); double my_double = atof(info); It seems to work, I think, but I'm getting an error when I try to print out the double. It says no matching function for ostream& << &double. Can anyone help me with this? | |
|
The End.