Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

applet problem

Status
Not open for further replies.

satellite03

IS-IT--Management
Dec 26, 2003
248
IN
hi,
what is the difference between panel() and contentpane()?

are these two thing same for a Jframe ?

can you tell me whats the difference beteen the two (if exist at all !) with a small example?
 
You may not add something to a JFrame directly.

But a JFrame has a contentPane, and to this, you may add things.

This contentPane isn't a Panel, and the JFrame has no Panel, unless you add one.

If you only add a Panel to the JFrames-contentPane, and add further things to this Panel - or add those things to the contentpane directly - I guess you will not see a difference, and maybee the methods, allowed to JPanel and the contentPane are nearly identically.

One difference is, that you may add Panels to Panels, but not 'getContentPane()'s.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top