Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Frames with tabs (make 2 frames ?)

 
Matt Fielder
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am working on setting up a GUI.
I'm on paper right now.

I want to keep general data at the very top like a header.
A section under and spanning the Frame I want one event interface.
Under that I want a section that is managed by 3 tabs to select between the three tasks.
The header with the general data and the top event will always be available.

Do I want to make a frame in a frame?
One giant frame to hold everything
A second frame to hold the tabbed panes at the bottom?

Or do I want to just use a layout manager that will contain the tabbed panes in the southern section?

I hope I made sense...
Also, how much of the details of each GUI section should be held in the main frame and how much should be held in other classes to be called by the main frame's constructor?

Ok... I think I'm done.
[ February 25, 2005: Message edited by: Matt Fielder ]
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if the event interface controls the visible 'tab' of the bottom section,
perhaps a cardlayout panel would be better than a JTabbedPane
 
Layne Lund
Ranch Hand
Posts: 3061
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Typically I have little to no code in my Frames when I make GUI apps. I usually have a Panel that contains the logic to set up the GUI. This makes it easier to change the application into an applet or other type of program.

As for the rest of your questions, I don't have much advice off the top of my head. You should probably mosey over to the GUI forum where questions like this are more on topic. Also, the experts on this topic will be more likely to hang out there.

Keep Coding!

Layne
 
Matt Fielder
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I always feel stupid when I only realize that there's an entire forum section dedicated to the issue that I'm asking about AFTER I post. *sigh* Oh well. Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic