• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JPanel issue - NetBeans 6.7

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have JFrame and JMenu bar. I want to add a JPanel depending on the menu item selected.

Here JPanel is another container with few components like JTable, Jbutton etc.

So when i select a menu item , The action performed method should instantiate the MYJPanel class and add to the JFrame.

Here is code.




Please advice is there a better way to do this. All I need is when user select a menuitem I want a JPanel to be added to the JFrame and Another Jpanel depending on the menu item selected.


 
reply
    Bookmark Topic Watch Topic
  • New Topic