Forum: Java 1 Day Ago |
| Replies: 2 Views: 87 Why not stick with the ButtonGroup? You can put both radio buttons and check boxes in the button group just fine. CheckboxGroup is for use with AWT Checkbox.
(By the way, you forgot... |
Forum: Java 1 Day Ago |
| Replies: 1 Views: 82 You are trying to assign a single int value to an int[] array. You need to assign that int to a specific element in your array, such as
stateCode[count] = input.nextInt(); |
Forum: Java 1 Day Ago |
| Replies: 6 Views: 99 The compiler is usually very explicit in telling you what the problem is.
At a quick glance, one problem is that you used "Pow" instead of "pow". Java is case sensitive . |
Forum: Java 1 Day Ago |
| Replies: 6 Views: 99 And what is your question? As I said, "it doesn't work" is not a question. Be specific. |
Forum: Java 1 Day Ago |
| Replies: 6 Views: 99 "It didn't work" is not a question.
And use code tags if you post code. |
Forum: Java 1 Day Ago |
| Replies: 6 Views: 103 ++
Me too. Not only is it unnecessary, the code just reads a whole lot cleaner without them.if (isComplete) {... |
Forum: JavaScript / DHTML / AJAX 1 Day Ago |
| Replies: 3 Views: 183 You already have a thread on this question here:
http://www.daniweb.com/forums/thread235128.html
Do not create multiple threads for the same question. |
Forum: Geeks' Lounge 1 Day Ago |
| Replies: 6 Views: 102 |
Forum: Java 1 Day Ago |
| Replies: 8 Views: 118 The literal value of a float in your code would be "6.0f", but printed output does not show that "f" unless you put it there explicitly.
Your output is perfectly fine. |
Forum: Java 1 Day Ago |
| Replies: 8 Views: 118 Are you expecting it to print the "f"? Doubles and floats don't look any different as output. |
Forum: Java 2 Days Ago |
| Replies: 6 Views: 106 So now you can create a CO2Footprint object and call methods on itCO2Footprint footprint = new CO2Footprint();
double[] glassReduct = footprint.calcGlassReductions(); |
Forum: Java 2 Days Ago |
| Replies: 2 Views: 78 Maybe you want to reverse line 23? |
Forum: Java 2 Days Ago |
| Replies: 2 Views: 63 That isn't Java code. Perhaps you meant to post this in another forum? |
Forum: Java 2 Days Ago |
| Replies: 6 Views: 106 Because you are calling that method statically but it is not declared as a static method. To call it as you have defined it, you would need to create an object of that type and call the method on it.... |
Forum: Java 2 Days Ago |
| Replies: 3 Views: 86 Walk through and match up your braces. |
Forum: Java 2 Days Ago |
| Replies: 8 Views: 187 Using the pattern (\w+?[RK]) with the regex Matcher.find() (http://java.sun.com/javase/6/docs/api/java/util/regex/Matcher.html#find()) method will capture all of those groups except for the last one,... |
Forum: Java 2 Days Ago |
| Replies: 17 Views: 230 (Yes, the HTML page source is just marked up text) |
Forum: Java 2 Days Ago |
| Replies: 17 Views: 230 Give it a quick try and you'd have a definitive answer. :) |
Forum: Java 2 Days Ago |
| Replies: 17 Views: 230 You can start with Reading Text From A URL (http://www.exampledepot.com/egs/java.net/ReadFromURL.html) and Regular Expressions (http://java.sun.com/docs/books/tutorial/essential/regex/). |
Forum: Java 2 Days Ago |
| Replies: 2 Views: 99 And don't you have about 5 threads started on this now? |
Forum: Computer Science 2 Days Ago |
| Replies: 9 Views: 140 My suggestion: learn how to type and communicate effectively. It will serve you well. |
Forum: Java 3 Days Ago |
| Replies: 18 Views: 249 I think you are correct that the behavior did stem from some blocking, but this can still be simplified a great deal to work without a separate listening thread.
Here's a re-wired version of the... |
Forum: Java 3 Days Ago |
| Replies: 5 Views: 132 The problem is that all of your code, including the thread.sleep() calls, are executing on the AWT event queue thread, which is the same thread that handles the repaint calls to update the display.... |
Forum: Java 3 Days Ago |
| Replies: 2 Views: 100 Well, to get rid of that error, don't call methods that do not existhelpMenu = menuBar().addMenu(tr("&Pomoc")); |
Forum: Java 3 Days Ago |
| Replies: 6 Views: 188 No, I hadn't seen anything about Nimbus as yet. It looks pretty nice.
Here at work we just use the XP look and feel and all of our time is taken up working on functional requirements. We don't... |
Forum: Java 3 Days Ago |
| Replies: 3 Views: 436 Looks like you have a bit of work ahead of you. Let us know if you have specific questions about portions of it. |
Forum: Java 4 Days Ago |
| Replies: 2 Views: 116 |
Forum: Geeks' Lounge 4 Days Ago |
| Replies: 68 Views: 98,409 |
Forum: Java 4 Days Ago |
| Replies: 6 Views: 188 It all comes down to the details of "changing the look". Some things are trivial, others are quite complicated. You asked a very general question.
If you just want to set the frame to be... |
Forum: Java 4 Days Ago |
| Replies: 8 Views: 130 Call methods on "clickedButton". I wrote that to show you how to obtain a reference to the button that was clicked. |
Forum: Java 4 Days Ago |
| Replies: 6 Views: 188 You can customize all kinds of things about how the UI appears. A lot is possible with the methods provided by the Swing components, but if that isn't sufficient it's possible to use the the... |
Forum: Java 4 Days Ago |
| Replies: 8 Views: 130 Your listener is setting the icon on whichever button i and j corresponds tobutton[i][j].setIcon(imageO);What you really want to do is getSource() from the mouse event and cast that to a JButton and... |
Forum: Java 4 Days Ago |
| Replies: 3 Views: 111 You could define a method like private void enableLength(boolean enable){
txtLength.setEnabled( enable );
lblLength.setEnabled( enable );
}so your if() code becomesif (optBox.isSelected() ){... |
Forum: Java 4 Days Ago |
| Replies: 8 Views: 130 You have to actually create the JButtons in your array. You have only declared the array of references with this statementJButton[][] button = new JButton[3][3];You must still initialize those... |
Forum: Site Layout and Usability 4 Days Ago |
| Replies: 1 Views: 134 Um, waiting for a question perhaps? |
Forum: Java 4 Days Ago |
| Replies: 2 Views: 99 |
Forum: C++ 4 Days Ago |
| Replies: 2 Views: 82 Probably conversion things.
Probably. |
Forum: Java 5 Days Ago |
| Replies: 2 Views: 127 Just like any anonymous implemenationreturn new Enumeration() {
public boolean hasMoreElements() {
throw new UnsupportedOperationException("Not supported yet.");
... |
Forum: HTML and CSS 5 Days Ago |
| Replies: 8 Views: 187 Agreed that this is more of a HTML/CSS question. Moving it over there. Carry on :) |
Forum: JavaScript / DHTML / AJAX 5 Days Ago |
| Replies: 1 Views: 134 Sounds like you probably need to fail then if you cannot show that you learned the material. Failing can be a great learning experience. |