Forum: Java 18 Hours Ago |
| Replies: 11 Views: 189 Re: Some questions about arrays To copy single dimension arrays, use System.arraycopy() (http://java.sun.com/javase/6/docs/api/java/lang/System.html#arraycopy(java.lang.Object,%20int,%20java.lang.Object,%20int,%20int)) or... |
Forum: Computer Science and Software Design 1 Day Ago |
| Replies: 1 Views: 77 |
Forum: Java 1 Day Ago |
| Replies: 7 Views: 145 |
Forum: Java 1 Day Ago |
| Replies: 18 Views: 201 Re: Help with component Personally, I've never used it for anything myself, but yeah it's in there. I usually find a simple text box, combo box, or slider more useful. I think repeatedly clicking an arrow to increment... |
Forum: Java 1 Day Ago |
| Replies: 11 Views: 189 Re: Some questions about arrays Your exact usage is a little bit vague, but it sounds like you want to use a Map (http://java.sun.com/javase/6/docs/api/java/util/Map.html) structure. The Hashtable that JavaAddict mentioned is one... |
Forum: Java 1 Day Ago |
| Replies: 2 Views: 79 Re: Server file input? That is probably the worst suggestion you could make for this. Separate classes is appropriate design for this. Just because Java will let you create a procedural program by stuffing everything into... |
Forum: Java 1 Day Ago |
| Replies: 11 Views: 245 |
Forum: Java 1 Day Ago |
| Replies: 18 Views: 201 Re: Help with component Swing does have that component. It's called a Spinner. Here's the tutorial link on it: http://java.sun.com/docs/books/tutorial/uiswing/components/spinner.html
Edit: Oops, I missed page two. I'm... |
Forum: Java 2 Days Ago |
| Replies: 3 Views: 115 Re: Generics with static inner class... You didn't show how Cell is declared, but you mentioned that it was a nested inner class. I would guess that you didn't declare it static. It would need to be static if you want to use it in a static... |
Forum: Java 2 Days Ago |
| Replies: 3 Views: 103 Re: file reading I'd agree with masijade. It looks like embedded RTF style info to me. Try to save the file as plain text. |
Forum: Java 2 Days Ago |
| Replies: 3 Views: 108 |
Forum: Java 2 Days Ago |
| Replies: 9 Views: 134 Re: New Line (/n) in JOptionPane Check the API doc for JOptionPane (http://java.sun.com/javase/6/docs/api/javax/swing/JOptionPane.html). The dialogs have several constructors you can choose from depending on how much you want to... |
Forum: Geeks' Lounge 3 Days Ago |
| Replies: 37 Views: 609 |
Forum: Geeks' Lounge 3 Days Ago |
| Replies: 37 Views: 609 |
Forum: Geeks' Lounge 3 Days Ago |
| Replies: 23 Views: 505 Re: Large Hadron Collider..... Waving your hands shouting "crazy scientists are going to destroy us all" is not quite the same as thoughtful speculation. |
Forum: Geeks' Lounge 3 Days Ago |
| Replies: 37 Views: 609 |
Forum: Java 3 Days Ago |
| Replies: 7 Views: 145 Re: Problem with playin Audio files!!!! Not if he no sound card or his speakers are not connected, not turned on, or turned all the way down :P
Since he stated he wrote it correctly, one of those must be the solution! |
Forum: Java 3 Days Ago |
| Replies: 1 Views: 66 Re: Need help doing sorts Well, I guess you weren't paying attention at all in class when sorting was discussed. You haven't even started a skeletal implementation of a single algorithm.
I'd say you have some reading to do... |
Forum: Geeks' Lounge 3 Days Ago |
| Replies: 37 Views: 609 Re: Is anyone else going to watch the train-wreck? Well, she didn't fall flat on her face, which is what I was hoping to see, but she certainly gave a lot of non-answers and rabbit-trailed off into "folksy" patter that had absolutely no real content.... |
Forum: Java 3 Days Ago |
| Replies: 6 Views: 153 Re: Canvas, pain() and playing sound Since you mention ME only runs against 1.4, the option may not be available, but just for the sake of info you would normally set that in the Project Properties dialog Sources node, Source/Binary... |
Forum: Geeks' Lounge 4 Days Ago |
| Replies: 37 Views: 609 |
Forum: Java 4 Days Ago |
| Replies: 6 Views: 153 Re: Canvas, pain() and playing sound If you only want the sound to be played on app-triggered repaints and not system-triggered (like repainting on resizes or other windows being dragged over it), you can override the update()... |
Forum: Java 5 Days Ago |
| Replies: 3 Views: 116 Re: Completing a Loop to Search the Directory Use ".equals()" to compare strings - not "=="(input.equals("Quit"))or to avoid potential null pointer exceptions("Quit".equals(input)). You also don't need to test booleans for "== true". The... |
Forum: Java 5 Days Ago |
| Replies: 4 Views: 121 Re: using arraylists Those are arrays - not ArrayLists - and why are you not using an object to represent each line item instead of three separate arrays for each piece of data? |
Forum: Java 5 Days Ago |
| Replies: 1 Views: 128 |
Forum: Java 5 Days Ago |
| Replies: 4 Views: 121 Re: using arraylists Assuming that each transaction line item is an object in a List, you can simply call Collections.sort(java.util.List, java.util.Comparator)... |
Forum: Java 5 Days Ago |
| Replies: 2 Views: 118 Re: Logic circuit builder Yep, better get acquainted with these pages: http://java.sun.com/docs/books/tutorial/uiswing/index.html |
Forum: Java 5 Days Ago |
| Replies: 3 Views: 136 Re: Program Interpolation If you don't have an API that you can use for the target program then about the only thing you could try would be the Robot (http://java.sun.com/javase/6/docs/api/java/awt/Robot.html) class. There's... |
Forum: Java 5 Days Ago |
| Replies: 1 Views: 130 Re: 2d array to image It may simply be a matter of incorrectly specifying the pixel values, because when I use this code (from the example in the MemoryImageSource... |
Forum: Post your Resume 6 Days Ago |
| Replies: 1 Views: 159 Re: Resume???? Well, if you want to get to the interview process at all, then yeah, it's rather important. |
Forum: Java 6 Days Ago |
| Replies: 2 Views: 146 Re: BlockinQueue using non-Blocking calls The compile error is due to the fact that BlockingQueue does not implement the List interface anywhere in it's hierarchy, which is what the SwingWorker requires in the process(List) method. You... |
Forum: Geeks' Lounge 6 Days Ago |
| Replies: 23 Views: 505 Re: Large Hadron Collider..... You bet. All those "crazy scientists" just want to kill themselves and their families.
Thanks for highlighting your ignorance in bold red letters for all to see. |
Forum: Computer Science and Software Design 7 Days Ago |
| Replies: 5 Views: 211 |
Forum: Java 7 Days Ago |
| Replies: 7 Views: 198 |
Forum: Java 7 Days Ago |
| Replies: 7 Views: 198 Re: Threads and Timer threatening my life Sorry, I suppose I could have explained that a bit. If you press a key the timer starts. If you keep pressing keys before the 2 second timer expires, nothing changes. If you don't press a key in 2... |
Forum: Java 7 Days Ago |
| Replies: 8 Views: 146 |
Forum: Java 7 Days Ago |
| Replies: 8 Views: 146 |
Forum: Java 7 Days Ago |
| Replies: 8 Views: 146 |
Forum: Java 7 Days Ago |
| Replies: 8 Views: 146 |
Forum: Java 7 Days Ago |
| Replies: 7 Views: 198 Re: Threads and Timer threatening my life In the first version, I think the only problem is that you are calling cancel on the timer, instead of the timekeeping task. I ran this simplified example here and it works just fine.
import... |