• Post Reply Bookmark Topic Watch Topic
  • New Topic

netbeans - change displayed gui content

 
F. Corsini
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello,

I'm trying to develop a GUI application and I've created the basic container with netbeans GUI visual editor, it makes it rather easy to do it

I've created a menuitem and I'd like that, when I click that item, the main content (basically a JLabel at the moment) is replaced with a form that I'd like to create with the GUI editor as well...

summarizing, how can I create 2, 3, 4 forms and switch between them clicking on a menu item?

any reply is really appreciated

thank you
 
pete stein
Bartender
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by F. Corsini:
I'm trying to develop a GUI application and I've created the basic container with netbeans GUI visual editor, it makes it rather easy to do it
some would argue that it may hamper your learning of how to code in Swing though (me included).

summarizing, how can I create 2, 3, 4 forms and switch between them clicking on a menu item?

I suggest that you look into trying the CardLayout layout manager. It allows for easy swapping between JPanels (or other Swing components).
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!