• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Use of JPanel() in JApplet is required?

 
Neeteesh Singh
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).
 
Neeteesh Singh
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much for your help... I would follow your advice.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic