1,034 Posted Topics
I know how to se the font of a regular JTextArea, but how would I get an reference to the selected text and only select that? Here is what I have so far: [Code] setFont(new Font(font, style = Font.BOLD, size)); [/Code] this works but changes whole area [Code] textArea2.getSelectedText().setFont(new Font("sansserif",Font.BOLD, … | |
I may not be understanding private inheritance right, but I thought when you inherited privately that you could still access public member data/functions, but the child class of the derived class would not. For some reason it is saying the public print() method is not accessable in this context....Is there … | |
Re: Just include the FULL path in the File object: File f = new File("C:/Program Files/Java/file.txt"); | |
Re: [QUOTE=md16185]It seems that alot of forums are too afraid to allow HTML, are people just being paranoid?[/QUOTE] Yes, they are sooooo paranoid. | |
Re: It doesn't look well multithreaded ;) What's the error? I'm guessing it just locks up and never connects, right? | |
Re: That means there is no method matching the signature you gave. It could be a parameter missing, a mispelling, or a number of problems. udit, you forget the t in paint: public void pain(Graphics g) change to; public void paint(Graphics g) | |
Re: I'm in AP Computer Science right now in high school, and I find it very easy. I guess the best way to go, would be find out what language they will be teaching the year you come up, and start learning early. Don't be fooled by the "AP", those classes … | |
Re: [QUOTE='Stein]Jeez, I'm suprised. Nothing here about WC yet. I guess we don't got too many soccer fans here :sad: Alrite, I wanna see 2 things posted: [COLOR="Blue"] 1) Who ya [i]want[/i] to win 2) Who [i]will[/i] win[/COLOR][/QUOTE] 1) Germany or USA 2) Brazil | |
Re: I hate talking on the phone. If there's a way I can avoid it, I'll do it. I don't know why I hate it so much, but I do. | |
Re: Is it really that hard? [code] if(isalpha(char)) [/code] I don't know if that takes a string or not, but if it's only a character then just loop through. | |
Re: You could TRY a keylistener but I'm not sure that'll work out exactly like you want. There should already be a mechanism built in that changes components when tab is pressed. I would stick to that if I were you. | |
Re: [QUOTE=iamthwee]Actually if you read the entire post, he used the word circle, instead of cycle. To most intelligent people that would mean something completely different to cycle. Isn't it possible that he could have had finished the first stage in his program, which is the algorithm you have outlined, and … | |
Re: [QUOTE=whiplash316] Get sex [/QUOTE] Have you illustrated some of these ideas? It could help. | |
I'm testing something on an old version of netscape, specifically 4.7. Everythings fine except for my javscript function doesn't work because it says getElementById is not a function: document.getElementById('ncp').src = "ncp" + pictureNum + ".jpg"; I've got many more of these type lines but it works fine in IE and … | |
Re: Hashset is an excellent idea, but if you want to just use arraylists then the contain method hook mentioned is the way to go. | |
Re: That means it couldn't find the destination. I noticed you are using command line args. Do you know how to get those? It won't run unless you have an argument to the right destination. | |
Re: I don't know if this will help or not. I've never used or had the desire to learn PHP, but since I haven't I can't say that it's worse or better than Java. Now, I do know a lot of Java(not compared to wenting though!). In Java, you can create … | |
Re: The % is a sign for modular division in java. | |
Re: No, it's nothing with your code. The class file cannot be found. This is common while using IDE's. The source file is placed in one directory, while the class file somehow ends up in another, and the JVM is looking in the directory that stores the source. Make sure that … | |
Re: I thought it was a lot of bit flipping and crap like that involved. I doubt just one person can write a full fledged photoshop by themeself. | |
Re: Are you creating the Random object each time that method is called? The Random object should bounce around and hit every number before repeating itself. | |
Re: I really don't care. If they want crappy work, then they can outsource it. Indians will work for dirt, but it takes 20 of them to do what one well paid American, Japenese, Canadian, or other person can do. It's not that they can pick it up quicker, they can't. … | |
Re: Basicly there's three steps: > 1. convert the two images to an array of integer. > 2. compare the two arrays. > 3. then decide if they're a similar or not. You convert the two images into an array by creating a PixelGrabber, and then getting the pixels. You can … | |
Re: I recommend a project ideas generator to help people like you. | |
Re: How long have you dealt with this error? Is it possible the servers at fault, and it's just a communication error? I would contact the administrator of the site and see what they say. Check in the java console, you never know the classname they are providing could be wrong. | |
Re: That REALLY sounds fun! Sauce, do you know of anywhere to buy a nice robotics programming package? Possibly for C++? That sounds really fun, but I can't seem to find much. | |
Re: I've thought about writing one of those. I may just do it. | |
Re: are you talking about something like this? [Code] BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int x; int count = 0; int i; do { System.out.println("enter a number"); i = Integer.parseInt(br.readLine()); x = x + i; count ++; } while(i != -1); int b = x / count; System.out.println("Average is: " … | |
Re: I think the java.sun site had a tutorial on creating one of these. This is actually the next project I want to take up! | |
Re: First of all, you should have some of that in a try-catch clause. That could help you out in figuring out the error. Then, since your using sql, make sure the URL passed to the DriverManager is correct, and make sure the parameters for the html page are correct. | |
Re: On the first exercise, you should have used .next() to read the string instead of .readLine(). I'm not sure why that didn't work unless that method is only for the BufferedReader. Maybe someone can help clarify that for you. [Code] rating = scan.next(); [/Code] On the second assignment, you should … | |
Re: Maybe this will work: Process p = Runtime.Runtime().exec("ipconfig"); | |
Re: Here's what I did for my final year project: A simple webcrawler hangman that helps you with the SAT flashcard game that allows you to easily create flashcards | |
Re: I had to laugh when I saw this thread. | |
Re: I hate it because it's hard for me to read. Now, I SUCK at all aspects of english and writing but at least I try. | |
Re: Why don't you play around in java a little with this idea, I mean, you could program stuff that will act on certain statements entered by the user, and soforth. | |
Re: I just now saw who took that picture!(I'm a bit slow sometimes) Did you by any chance take that while you were in spain? I like space pictures myself, but I guess you would need a telescope to take pictures of that. | |
Re: Hopefully the implemented basic security so you can't do this without permission. | |
I was stupid and didn't add any security to my wirless network when I set it up. I guess I thought it would be quicker. Anyways, is there a way to just add it after you have everything set up? Or do I have to reinstall everything? | |
Re: New code --- Efficency Modifying code -- improve efficency :mrgreen: | |
Re: [QUOTE=C++]please regard my last message - i figured it out. Is there a way to find the temperature of the cpu? thanx[/QUOTE] Thermometer? | |
Re: [QUOTE=Paul.Esson]in java are signed bytes and the signed bit is the last bit... [/QUOTE] The signed bit is the first bit, the leftmost bit. 1001 0000 0000 0000 0000 0000 0000 0000 The signed bit is a 1. -- negative I think you got it, you just said the wrong … | |
Re: Formula for each element: [code] R! -------- C!(R-C)! [/code] | |
Re: I say let HER decide what she wants to do and respect the decision she makes. | |
Re: textArea.setForeground(Color.blue); There might be some mistakes in the Foreground part, I can't remember how to spell right now, nor which letters to capitalize. | |
Re: There is no language called 'best'. That's the bottom line. On a serious note, however, you can't get any easier than vb.net with visual studio. Of course, you might should listen to vegaseat. C# is definately catching on. | |
Re: Maybe use an imagefilter. If not that, then start shifting some bits. | |
Re: Use a StringTokenizer(). It's default pattern is the space character, so it reads in only the words. You can loop through in a while loop. | |
I was wondering when to use novell. Are there certain things to look for? Does it have advantages over server 2003? What about at a hospital, would it be a good idea to use novell when there is 1000 employees and most have 2 computers? |
The End.