• Post Reply Bookmark Topic Watch Topic
  • New Topic

opening and closing frames with buttons?  RSS feed

 
Phillip Grekstas
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How would I go about creating a frame in which I could open and close other objects/frames in the style of a menu? I have very little experience with GUIs and have found little examples of such code. I am trying to create a simple Point of Sale system in which after logging in, will display a page with 4 buttons that would each open a different object/frame/page (i.e. clicking on Invoice button would open Invoice creator object and effectively close the old menu). Any help or suggestions would be appreciated.

Thanks
Philgrek
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
> will display a page with 4 buttons that would each open a different object/frame/page

sounds ideally suited to a CardLayout, where your 4 buttons might be JMenuItems,
with each JMenuItem tasked to 'show' the relevant page
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!