The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.

Vague answers (or none at all) result from vague questions. I suggest you start another thread with this question, containing a bit more information and code describing the problem, what you have, and what you wish to accomplish.

Re: JApplets and JFileUploader

In Applets you can override paint(...)
In JApplets you can override paintComponent(...)

Better than either is to override paintComponent(..) in a JPanel or JComponent and add that (or set as contentPane) in a JApplet. That way, you can re-use your JPanel/JComponent by adding the same JPanel to a JFrame/JDIalog or by passing it as the message parameter to a JOptionPane.

Re: JApplets and JFileUploader

^^ what Darryl said.

Build your GUI off of a JPanel/JComponent, then you can simply add it to your applet if you want to make an Applet/JApplet, or you can set it to the content pane of your JFrame if you want a stand-alone Java application.

I've seen them make an applet with shapes drawn in more than one color, but that used a switch statement and I'm not good at those, maybe I should have paid a bit more attention in class when that part was discussed. Anyway, if a break statement at line two will take it out of the switch structure even if a valid and true value was on line 3, do you use continue if you want it to check line 3 and so on?

Also, maybe I'm just a but are FileChoosers pretty complicated, i.e. something someone who's only been doing GUIs for less than a year's worth, should be fiddling with, or are they pretty easy to get it to read and write and upload stuff? I got it to write part of an object in another class thing but part of that object wasn't Serializable. Also, if I'm going to change components, like update the text in a text area, or have the saved layout start out with the last used background color setting, do I have to remove the old ones and bring in the updated ones? You can't add an Object to a JPanel. How do you put back in the object that was made from readObject() and writeObject()? However, if the said Object is also a Component then it can be added. Is there a way to make the writeObject() or readObject() value made by writing the Component and then reading the Object back in a reference variable of Component? Yeah I need a try and catch block to deal with the possibility of a Class Cast Exception, but is it doable?