Forum: Java 13 Hours Ago |
| Replies: 5 Views: 796 Read before you post. That is exactly what neilcoffey explained above - in January. |
Forum: Java 1 Day Ago |
| Replies: 1 Views: 104 You should start typing - that's where source code comes from. Post actual questions when you have specific troubles. |
Forum: Java 1 Day Ago |
| Replies: 5 Views: 901 Then you're just out of luck I suppose, because this isn't "Codes R Us" and you didn't even manage to find the correct language section - this is Java, not PHP. |
Forum: Java 5 Days Ago |
| Replies: 2 Views: 149 Cast your Graphics reference to Graphics2D and turn on anti-aliasing:Graphics2D g2D = (Graphics2D)g;
g2D.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); |
Forum: Java 6 Days Ago |
| Replies: 6 Views: 207 Those are actually unrelated to the painting example. That code just makes sure that the GUI initialization occurs on the event dispatch thread. You can read more about that here if you are curious:... |
Forum: Java 6 Days Ago |
| Replies: 6 Views: 207 Here's the minimal implementation of drawing lines on a JPanel. The important part is extending JPanel to override paintComponent() and use the Graphics reference to paint what you need to.import... |
Forum: Java 6 Days Ago |
| Replies: 2 Views: 181 You might take a look at using internal frames: http://java.sun.com/docs/books/tutorial/uiswing/components/internalframe.html |
Forum: Java 6 Days Ago |
| Replies: 6 Views: 207 Start here:
http://java.sun.com/docs/books/tutorial/uiswing/painting/index.html
and
http://java.sun.com/docs/books/tutorial/2d/index.html |
Forum: Java 7 Days Ago |
| Replies: 3 Views: 159 Move the validate() call down after you add the "Game" component c.add(Game, BorderLayout.CENTER);
c.validate(); |
Forum: Java 8 Days Ago |
| Replies: 2 Views: 166 You're adding your components to the frame content pane itself - not the JPanel that you're constructing. So you end up with an empty panel plus your splitpane. You just need alter two lines to fix... |
Forum: Java 11 Days Ago |
| Replies: 3 Views: 196 You don't call that method directly. That is called by the UI painting methods. If you call repaint() to update the screen, that method will automatically be called. |
Forum: Java 11 Days Ago |
| Replies: 3 Views: 196 What you describe sounds like it should work just fine. Perhaps you have a bug in adding to your x position or you are re-declaring x to be zero each iteration? Hard to say without code. |
Forum: Java 11 Days Ago |
| Replies: 6 Views: 314 |
Forum: Java 11 Days Ago |
| Replies: 3 Views: 263 It is most likely a focus issue. Read the tutorial on writing key listeners: http://java.sun.com/docs/books/tutorial/uiswing/events/keylistener.html
If you need to respond to specific keys being... |
Forum: Java 12 Days Ago |
| Replies: 1 Views: 160 I'd recommend reading this: http://www.daniweb.com/forums/announcement9-2.html
Begin outlining the logic of the program enough to ask specific questions. |
Forum: Java 13 Days Ago |
| Replies: 4 Views: 232 Right-click on the panel or frame object in the Navigator pane and "Set Layout" to a different layout. |
Forum: Java 13 Days Ago |
| Replies: 1 Views: 170 I would guess that you might be declaring a local "exit" button variable and adding that to the container, instead of the one that you have declared at the class level. I can't really say for certain... |
Forum: Java 13 Days Ago |
| Replies: 3 Views: 139 booster1 = numBoxes.BandBooster(name);is not valid and will not compile. You need to updateSales() for "booster1", which you have a method for. |
Forum: Java 13 Days Ago |
| Replies: 4 Views: 232 I've used the Netbeans GUI builder for years and I don't know what you're referring to. Perhaps if you could be more specific someone could offer advice? |
Forum: Java 13 Days Ago |
| Replies: 15 Views: 3,113 while (notPayingAttentionToTheRules) {
ignore();
}
Start a new thread if you have a question. Show some effort if you would like assistance. |
Forum: Java 13 Days Ago |
| Replies: 2 Views: 191 That error message should contain a little more information at the end. They are appending the string description on that line.
If you want more info than that, add an "e2.printStackTrace()" in... |
Forum: Java 13 Days Ago |
| Replies: 2 Views: 131 The api doc on getElementsByTagName states that it So yes, you should be able to pair them directly.
On the second question, you say the sax parser is dying on an out of memory or the dom parser?... |
Forum: Java 13 Days Ago |
| Replies: 8 Views: 234 Well, if you wanted the latest Xerces libraries, you did need to download them and add them to your project. It just happens that Sun also included a Xerces implementation as the default for the JAXP... |
Forum: Java 13 Days Ago |
| Replies: 8 Views: 234 Because a version of the xerces parser ships with the JDK and is used as the default DocumentBuilderFactory if you haven't registered a different one.
It's not using the libraries that you... |
Forum: Java 13 Days Ago |
| Replies: 8 Views: 234 Did you not have a "xerces.jar" file as well? From the online docs it looks like you should, but perhaps "xercesImpl.jar" has replaced that.
Edit: I just pulled down the latest binaries and... |
Forum: Java 13 Days Ago |
| Replies: 4 Views: 153 I don't think you want that semi-colon on the end of your if() statement - it makes for an empty statement. |
Forum: Java 13 Days Ago |
| Replies: 8 Views: 234 You need to add the jar files for those libraries to your project properties. In the Project Propteries window, select Libraries and add those jars in the Compile section. |
Forum: Java 13 Days Ago |
| Replies: 7 Views: 267 main() shouldn't be accessing those variables directly. They are instance variables of your database class. Most of that code should be in your action listener for the submit button. |
Forum: Java 13 Days Ago |
| Replies: 7 Views: 267 You want to submit the text of "queryField", not the component itself. |
Forum: Java 13 Days Ago |
| Replies: 3 Views: 300 You mentioned the OpenOffice API above. Have you tried that? I know they have a java-based API for automation, but I haven't used it personally. |
Forum: Java 13 Days Ago |
| Replies: 4 Views: 153 Hmm, I thought the genius bar was set a little higher.
Read carefully the API doc on hasNext() (http://java.sun.com/javase/6/docs/api/java/util/Scanner.html#hasNext()), especially the part about... |
Forum: Java 13 Days Ago |
| Replies: 16 Views: 604 Netbeans does allow you to work in GridBagLayout (or several others) from the designer if you set it yourself. It defaults to GroupLayout though, which is hideous to read. |
Forum: Java 14 Days Ago |
| Replies: 2 Views: 231 Write code to parse this data (http://www.google.com/search?q=site%3Adaniweb.com+final+project) and make a selection. |
Forum: Java 14 Days Ago |
| Replies: 1 Views: 135 Take a look at GraphicsEnvironment (http://java.sun.com/javase/6/docs/api/java/awt/GraphicsEnvironment.html) and GraphicsDevice (http://java.sun.com/javase/6/docs/api/java/awt/GraphicsDevice.html).... |
Forum: Java 14 Days Ago |
| Replies: 1 Views: 227 Start with the Sun tutorial on printing: http://java.sun.com/docs/books/tutorial/2d/printing/index.html |
Forum: Java 14 Days Ago |
| Replies: 3 Views: 163 Perhaps you should eEOF.printStackTrace() and see what the stack trace has to say on it. Your custom error message isn't telling you much. |
Forum: Java 14 Days Ago |
| Replies: 3 Views: 275 What makes you think the method isn't being called? I would guess that it takes about 7 seconds for that whole method to finish - and it only updates the display after it's done.
If my guess is... |
Forum: Java 14 Days Ago |
| Replies: 7 Views: 385 If there isn't any behavior of Thread that you need to alter by subclassing, why would you extend Thread? That's what they are saying here. If you can't point to an advantage in your code to extend... |
Forum: Java 14 Days Ago |
| Replies: 3 Views: 163 I don't know. Why don't you add a few more println() statements to see how far you're getting in the program and where it's breaking down?
At the very least, post what you suspect the problem is.... |
Forum: Java 14 Days Ago |
| Replies: 7 Views: 267 If you need to retrieve info about the columns in the result set, you can get that with ResultSet.getMetaData() (http://java.sun.com/javase/6/docs/api/java/sql/ResultSet.html#getMetaData()). The... |