• 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:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Tabbed UI or Internal Frames

 
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am writing an app that will be used as the UI for different functions related to the same overall project.
I will have an OO design that will either use internal frames (each internal frame used for a function), or a tabbed window (each tab used for a different function).
I would appreciate any thoughts on which of these would be the better choice, or perhaps something else I have not thought of.
It is going to be a large UI and I want to start out with a good design.
Thanks,
Rob
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As long as you have a JPanel for each "function", it doesn't really matter if you use a JDesktop/JInternalFrame approach, or a series of tabbed panes. When you need to display the appropriate "function", you can add it to either a tab or an internal frame.

Actually, the only design issues would be these:
  • Does the user need access to multiple "functions" at the same time? Then you should use the internal frame approach.
  • Should the user only have access to one function at a time ( for validation or locking related reasons )? Then you should use the tabbed pane approach.

  •  
    Rob Levo
    Ranch Hand
    Posts: 167
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    Originally posted by Nathan Pruett:
    As long as you have a JPanel for each "function", it doesn't really matter if you use a JDesktop/JInternalFrame approach, or a series of tabbed panes. When you need to display the appropriate "function", you can add it to either a tab or an internal frame.

    Actually, the only design issues would be these:

  • Does the user need access to multiple "functions" at the same time? Then you should use the internal frame approach.
  • Should the user only have access to one function at a time ( for validation or locking related reasons )? Then you should use the tabbed pane approach.


  • Thanks!
    Would I be able to dynamaically change the main menu when switching internal frames or by switching tabs, this will be a requirement.
    Each "function" will have its own menus, menu bar and fucntionality, and the plan is for all this to be done dynamcially when switching "functions".
    When you say that each "function has to have its own JPanel, do you mean one JPanel for each internal frame. Or if I used the tabbed apprpoach, one JPanel for each tabbed window?
    Thanks again,
    Rob
     
    Nathan Pruett
    Bartender
    Posts: 4121
    IntelliJ IDE Spring Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Yes, I meant you would have a panel for each function, and each panel can go on either a tab or in an internal frame.

    And yes... you can dynamically change the menubar when switching between functions... You can either listen for the tabs being selected or the JInternalFrames being on top. I would subclass JPanel with a method that returned that functions menu.

    Though, I don't know if switching the entire menu bar for each function is a good idea... does the app have any common functionality that will behave the same across all functions (i.e. Exit, application help, save, load...) it may be a better idea to have a general menubar for the whole app, and have one menu that changes based on the selected function.

    Of course, if you go with the internal frame approach, you could have the menubar for the application on top of the application, and have a menubar on each of the internal frames.
     
    Rob Levo
    Ranch Hand
    Posts: 167
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Nate,
    Thanks for the clarification, big help!
    Take care,
    Rob
     
    reply
      Bookmark Topic Watch Topic
    • New Topic