1,678 Posted Topics

Member Avatar for Moirae

setSelected(true) would make a check box checked, setSelected(false) would make the check box unchecked. It does the equivalent for a JToggleButton, so I imagine it'd make it appear pressed if you set it to true.

Member Avatar for BestJewSinceJC
0
88
Member Avatar for gunjannigam

Then use a JPanel for your splash screen, but add the JPanel to a JFrame, and set it to visible.

Member Avatar for BestJewSinceJC
0
43
Member Avatar for rrspen316

That is a lot of code - the short answer is that you'd use a JComboBox. It's fairly simple and there are plenty of examples here: [url]http://java.sun.com/docs/books/tutorial/uiswing/components/combobox.html[/url]

Member Avatar for BestJewSinceJC
0
274
Member Avatar for kkcaddy

There are a lot of tutorials available on the web, some of which were linked to in this forum in the stick that was mentioned before. Use those. Ask questions. Get help.

Member Avatar for BestJewSinceJC
0
114
Member Avatar for slfisher

I couldn't disagree with you more, PirateTUX. Jurors are forbidden from doing this kind of research because it introduces bias into the process and it takes control away from the court. Anyone who is doing outside research is introducing "facts" which may or may not be true and is researching …

Member Avatar for BestJewSinceJC
0
108
Member Avatar for BestJewSinceJC

Hey guys, I bought a new computer with 4 gigs of ram, 64 bit windows vista OS, dual core 2.4 ghz processor. . and I'm having some problems with it. Firefox frequently seems to mess up. Sometimes it won't stop loading a page when I click 'X', it will become …

Member Avatar for goldeagle2005
0
284
Member Avatar for and12

Yeah, I can't enter a consonant either. I tried doing so in all of the open text boxes.

Member Avatar for and12
0
246
Member Avatar for scias23

RPS is an extremely simple game. . because of that, it isn't really necessary to do it OP style - what would your objects be? The Rock, Paper, and Scissors need not be Objects because they are better represented as Strings (in my opinion). I suppose you could make the …

Member Avatar for TheWhite
1
605
Member Avatar for Nitroxxerz

I'm not sure about this, but I think using Collections.sort(yourArray) would also do the same thing javaAddict is suggesting. But it seems like your assignment is to write the sorting method yourself, so you'll need to specify what vernon mentioned.

Member Avatar for amitrail
0
166
Member Avatar for TheWhite

This sounds like a very cool project - one I can't help with - but please post the solution once you've worked your way through it!

Member Avatar for JamesCherrill
0
134
Member Avatar for jooa
Member Avatar for rwebber77

Vernon already gave you great advice. . I noticed you have the following line of code: [CODE=Java]double totalOilChangeCost = (distanceTravel / 3000) * 30;[/CODE] Since distanceTravel is an integer, and 3000 and 30 are integers, the whole expression will, I think, result in an integer. You can use a println …

Member Avatar for BestJewSinceJC
0
148
Member Avatar for BlackPhoenix

You can also use Java 3D for 3D graphics. A lot of people use OpenGL bindings for Java also.

Member Avatar for BlackPhoenix
0
256
Member Avatar for coud_ren_26

If you want to print a price list and then print a receipt, one good way to do it would be to look at the similarities: both a receipt and a price list contain items. So you could build an item class that had variables such as cost and sales …

Member Avatar for BestJewSinceJC
0
97
Member Avatar for BlackPhoenix

I don't think Java 3D is a dead technology. . but I asked a similar question of an enterprise developer, and he said that he thinks OpenGL for Java is better than Java 3D. I've heard that OpenGL with C++ is faster though.

Member Avatar for Ezzaral
0
143
Member Avatar for jooa

All you need to do to draw the circle in its final position is call repaint, set the coordinates of where you want the circle to be drawn, then draw the circle at that position. You'd put the method calls to do that inside of mouseReleased.

Member Avatar for jooa
0
2K
Member Avatar for Laidler

I don't really see anything wrong. You said they are JPanels but they are JLabels. (You can set the background on either, so again, no problem). Do you mind posting your code?

Member Avatar for Laidler
0
91
Member Avatar for no1zson

"What I am not checking for is a character response." You can look into ASCII character values; in order to make sure that something is an integer (or is not a character), you would compare the character to a range of ASCII values which can be found on the table. …

Member Avatar for no1zson
0
174
Member Avatar for ChiboSempai

GridBagLayout gives you a pretty good deal of customizability.. [url]http://java.sun.com/docs/books/tutorial/uiswing/layout/gridbag.html[/url] Alternatively, you could stick with whatever Layout Manager you're using and explicitly set the size of the text fields using setSize or setPreferredSize - either of those should stop the text fields from taking up the whole window.

Member Avatar for BestJewSinceJC
0
128
Member Avatar for darkyere

Yes, both are possible. Resizing the image may be tough but it is definitely possible, however, you'll have to wait on someone else to answer how to go about doing that. For forcing a window to stay open until a correct password is entered, you'd look into WindowListener. [url]http://java.sun.com/docs/books/tutorial/uiswing/events/windowlistener.html[/url]

Member Avatar for BestJewSinceJC
0
138
Member Avatar for ashish2234

Have you read about JMF? There are a lot of explanations of why it is difficult to do things such as writing pause methods for audio clips. And there is guidance to how to accomplish doing it if you really decide to take on the challenge.

Member Avatar for prisonpassioner
0
134
Member Avatar for kbjustin

popupPanel.setLayout(null); ^^ Looks like a bad idea although the layout manager might use a default layout as a result of you doing that. Although it was already using a default layout so.. why? You also might want to try calling the pack() method on the popupPanel. Perhaps setVisible as well. …

Member Avatar for BestJewSinceJC
0
148
Member Avatar for akulkarni

This isn't a website for hand holding. The information is readily available. Look it up. Figure it out.

Member Avatar for BestJewSinceJC
0
141
Member Avatar for java dummy

Try to avoid giving people solutions unless it is impossible to help them without pointing out the exact code.

Member Avatar for BestJewSinceJC
0
179
Member Avatar for Half_Pirate

"However, since I've only learnt Linked List so far so I thought that playing some tricks on Linked List would do create the Circular." You are pretty much correct. The differences that I can think of off the top of my head: 1) Obviously, the circularly linked list needs a …

Member Avatar for eng.M4AH
0
145
Member Avatar for toucan

I'm not sure that this is the issue, but just so you know, the while loop condition is only going to be checked [I]after[/I] the method call that is inside the while loop completes. You probably knew that. Other than that, I'm not sure I understand what problem you're having. …

Member Avatar for JamesCherrill
0
182
Member Avatar for terence6203

terence - I apologize for not having comments on your code, but I just don't have time to wade through it right now. But keep in mind that comments should be used for clarifying the code when it is necessary to do so, or for explaining what a line (or …

Member Avatar for terence6203
0
678
Member Avatar for axeeffect2002

You can accomplish this in a number of ways using Swing and basically every other GUI toolkit available. Swing is easy to learn though, and it can be accomplished with only one panel, but peter's suggestion is good.

Member Avatar for axeeffect2002
0
73
Member Avatar for ChangBroot

And why can't he override paintComponent, setting the color to whatever he wants, using the drawString method to write text, then changing the color when he wants to?

Member Avatar for ChangBroot
0
372
Member Avatar for PatMcC
Member Avatar for xeolabs
0
235
Member Avatar for jakx12

If you just want something to practice then just go to a college's website, find the level course that matches your skill level, and do a random project on there. We aren't here to give project ideas.

Member Avatar for jakx12
0
115
Member Avatar for jonny_java

I'd recommend JFreeChart. It isn't that hard to use. I'll tell you what, I'll give you a sample piece of code that my teammate wrote on our project that produces a bar graph. You'll have to edit it a lot (hopefully) to get what you want, but it should give …

Member Avatar for jonny_java
0
262
Member Avatar for Nathan Campos

The method you must implement has the method header commandAction(Command, Displayable) whereas the method you wrote has the method header CommandAction(Command, Displayable). These are considered two different methods since Java is case sensitive, which is why you're getting the error. Also, keep in mind that commandAction follows the recommended syntax …

Member Avatar for Nathan Campos
0
107
Member Avatar for jakx12
Member Avatar for Iamkishan

[CODE=Java]If you truly made an effort to use the code tags you would have used them correctly. There is a sticky at the top of the forum showing how to use them. There is a button on the post reply box that inserts code tags. You can also "reply w/ …

Member Avatar for Nathan Campos
0
93
Member Avatar for GregStoltz

"...and in a specific spot on the page?" I don't understand. Where on the page do you want it to print?

Member Avatar for GregStoltz
0
79
Member Avatar for llemes4011

If your inner classes are implemented in a way that does not cause a compiler error, I do not think you can get errors such as memory leaks or anything of that nature. However, when defining inner classes inside an abstract class, I'd be careful about what techniques and syntax …

Member Avatar for llemes4011
0
115
Member Avatar for cesarnz

I'm not sure of your level of experience so I'll post this just in case you don't know stack issues, which you may: [url]http://en.wikipedia.org/wiki/Stack_overflow[/url]

Member Avatar for cesarnz
0
117
Member Avatar for TheWhite

Use the setSize method. The preferred size is just that - preferred. The layout manager is probably ignoring your preference, whereas if you use setSize, you might have better luck. Oh, and set the size of the scroll pane, which contains the other object. If that doesn't work try setting …

Member Avatar for TheWhite
0
1K
Member Avatar for NavyMan

Post the code for your class in the code=java code tags and I'll help you solve this error. I've gotten similar errors before as well. If you don't know how to use code tags then read the sticky at the top of this forum.

Member Avatar for NavyMan
0
191
Member Avatar for FMcinnis

Easy to use or easy to build? I recommend Java, although surely I'm pretty quick to recommend Java so you might want some other opinions as well. Java is great for user interfaces - ease of programming and ease of use, but I'm not so sure about processor and time …

Member Avatar for ithelp
0
260
Member Avatar for NavyMan

First of all it looks like you have a bunch of arrays that contain related information. . the item number, price of DVD, and name of a DVD all go together, correct? If the answer is yes, then you should create a class, perhaps called DVD, that has the necessary …

Member Avatar for BestJewSinceJC
0
112
Member Avatar for andrewjm

You can't "dynamically name" variables in Java. I don't know of any language where you can do that, although one might exist. I might be confused by what you're trying to do, but there is a LinkedList class in Java. If you were to use [CODE=Java] LinkedList<YourClassnameHere> list = new …

Member Avatar for BestJewSinceJC
0
112
Member Avatar for mzprog

An easier way to do it might be to have a JPanel inside a JPanel. The outer JPanel would use a BorderLayout, and the JPanel that you add to that one would have a GridLayout with one column. The idea being that when you added the second JPanel to the …

Member Avatar for BestJewSinceJC
0
287
Member Avatar for Acegikmo

Yes. Use the getResource method. You can find a lot of stuff on daniweb in this forum about loading images. Try this first though. [url]http://java.sun.com/docs/books/tutorial/uiswing/components/icon.html[/url] ]

Member Avatar for llemes4011
0
111
Member Avatar for GregStoltz

[url]http://java.sun.com/docs/books/tutorial/uiswing/components/table.html#combobox[/url]

Member Avatar for KirkPatrick
0
69
Member Avatar for bigbadbag33

Correct. You have no entry point for your application (it can not run). The correct declaration is public static void main(String[] args). You're missing the brackets. Also, the code tags that you would have used had you read the forum rules. :)

Member Avatar for BestJewSinceJC
0
114
Member Avatar for kevlam

I don't understand your description. You want to "break" after a parameter like value is displayed? What? And how can you do something after 30 threads, when you only have one thread running in your program?

Member Avatar for kevlam
0
97
Member Avatar for ndoe

How about you show us your code. Because I'm almost positive that calling setVisible on a JButton will work, so your code must be setting it to visible again after you set it to "invisible".

Member Avatar for ndoe
0
68
Member Avatar for MonicaClare

It doesn't work because you declared a variable, "c", inside of a for loop. When that for loop ended, that variable went out of scope (was destroyed). So in the next for loop where you tried to refer to "c", the compiler has no idea what you're talking about.

Member Avatar for Godstryke
0
210

The End.