my dog learned polymorphism*
The moose likes Swing / AWT / SWT and the fly likes Jpanel not displayed Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Jpanel not displayed" Watch "Jpanel not displayed" New topic
Author

Jpanel not displayed

mark smith
Ranch Hand

Joined: Apr 05, 2005
Posts: 245
hi

in a class i do



code of this class


nothing is displayed... any idea?

thanks
Moojid Hamid
Ranch Hand

Joined: Mar 07, 2009
Posts: 120
You need a "Top-Level Container"
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
and you also need to add the tabbedPane to its container (the class TestPanel)
mark smith
Ranch Hand

Joined: Apr 05, 2005
Posts: 245
ok so every jpanel need to be added in a jframe?
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19538
    
  16

Or another control like a second JPanel, a JTabbedPane or a JScrollPane. But in the end, all controls must be directly or indirectly added to a (J)Frame, (J)Dialog, (J)Window or (J)Applet.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Jpanel not displayed
 
Similar Threads
call paint method on a JPanel
Generat JAR file with resouces such as picture and music!
Graphics2D window not being repaired?
JSlider issue
JPanel Form Problems