• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Dynamic Jpanel

 
Tae Kim
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any takers ??
 
Rob Spoor
Sheriff
Pie
Posts: 20494
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
PatienceIsAVirtue.
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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) {
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic