Forums Register Login

Tabbed UI or Internal Frames

+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
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.

  • +Pie Number of slices to send: Send
     

    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
    +Pie Number of slices to send: Send
    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.
    +Pie Number of slices to send: Send
    Nate,
    Thanks for the clarification, big help!
    Take care,
    Rob
    Happily living in the valley of the dried frogs with a few tiny ads.
    a bit of art, as a gift, that will fit in a stocking
    https://gardener-gift.com


    reply
    reply
    This thread has been viewed 1517 times.
    Similar Threads
    Implementing listeners to menu events
    InternalFrame Listener
    Safe to have multiple Struts inputs with same name?
    opening a frame on click on JMenuItem
    Pls Rate My proposed GUI concept for Assignment
    More...

    All times above are in ranch (not your local) time.
    The current ranch time is
    Apr 16, 2024 07:24:03.