aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Dynamic Jpanel Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Dynamic Jpanel" Watch "Dynamic Jpanel" New topic
Author

Dynamic Jpanel

Tae Kim
Greenhorn

Joined: Apr 16, 2010
Posts: 5
OK I am taking the original post out and substituting it with this simpler problem. If you look at the code, you will see in the buildMainPanel() all I am trying to do is to create a new panel in the main container. But obciously there is this scope issue how can I get rid of this problem?

Tae Kim
Greenhorn

Joined: Apr 16, 2010
Posts: 5
Any takers ??
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19720
    
  20

PatienceIsAVirtue.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
pass a reference

//CollapsablePanel cp1 = new CollapsablePanel("Main Queue", buildMainPanel());
CollapsablePanel cp1 = new CollapsablePanel("Main Queue", buildMainPanel(contentPane));

//public static JPanel buildMainPanel() {
public static JPanel buildMainPanel(final Container contentPane) {
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Dynamic Jpanel