wood burning stoves 2.0*
The moose likes Java in General and the fly likes jtabbed pane question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Java in General
Bookmark "jtabbed pane question" Watch "jtabbed pane question" New topic
Author

jtabbed pane question

krillian konstatos
Ranch Hand

Joined: Jan 03, 2011
Posts: 49

I have a project in which i uses three instances of a JTabbedPane component. The first is presented as "menu" attached to the main jframe.
Here i have two tabs. Now the second tabs contains a class that extends a JPanel object in which i use a JSplitPane as main component.
As lower component in the splitpane object i use a JDesktopPane component containing a JInternalFrame presenting a form. The second JTabbedPane
object is located in the main JTabbedPane component and here i use another JDesktopPane component with a second JInternalFrame attached to it
containing a user selection form. In this the second JTabbedPane component i use five different tabs containing JPanel objects so the whole application
uses totally a number of seven tabs. My question is if it is wise to use nested jtabbedpane components even if they are divided and located in
subcomponents? I have heard that the use of tabbedpane takes up a lot of cpu memory not just in java but also in other environments. Is this a
correct observation from my point? Maybe i have totally wrong and should not worry about this issue at all. I hope somone will understand what i am concerned with
for the future development of my project in question maybe i should limit my use of tabbedpane components to one instance.
Finally i am not that comfortable in describing subjects like this in english in case someone will notice it
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18570
    
    8

krillian konstatos wrote:I have heard that the use of tabbedpane takes up a lot of cpu memory not just in java but also in other environments. Is this a correct observation from my point?

That depends on what you mean by "a lot". Or, it depends on what somebody else meant by "a lot" when they said that.
Maybe i have totally wrong and should not worry about this issue at all.

I don't think it's worth worrying about. Personally I think the statement is rubbish, but at any rate I wouldn't translate it into "Never use a JTabbedPane". Also google the phrase "premature optimization" and read what everybody has to say about that.
 
GeeCON Prague 2014
 
subject: jtabbed pane question