File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Applets and the fly likes Use of JPanel() in JApplet is required? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Applets
Reply Bookmark "Use of JPanel() in JApplet is required?" Watch "Use of JPanel() in JApplet is required?" New topic
Author

Use of JPanel() in JApplet is required?

Neeteesh Singh
Greenhorn

Joined: Sep 15, 2008
Posts: 9
Hello,

I am new to Applet. I have a question on JPanel. Should I use JPanel with JApplet. What I want to know is that should I use a JPanel as a Container for the various applet components or should I directly add the various components to the applet itself. what is a better approach. Just want to know about the approach and better programming style for Applet or JApplet.

Thank You,
Neeteesh


Neeteesh Singh<br />SCJP 1.4<br />SCWCD 1.4
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35236
    
    7
It's not required, since adding components to the JApplet works fine. I'd recommend doing it, though, since that makes it easier to change the layout later (you only need to deal with the JPanel, and not with all the individual components).


Android appsImageJ pluginsJava web charts
Neeteesh Singh
Greenhorn

Joined: Sep 15, 2008
Posts: 9
Thank you very much for your help... I would follow your advice.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Use of JPanel() in JApplet is required?
 
Similar Threads
Problem displaying panel in an applet
How to launch a webpage from a browser from an application and an applet
Confused about class Applet and JApplet
JApplet within JInternalFrame...Please help
How to properly create an applet with an Input field and some shapes.