Hello
I am trying to figure what kind of code that would be needed to add a JTabbedPane to an JInternalFrame.

I have 7 tabs added now (as many as I need) they are added by simply adding(hard coded) the "text name" to an array and every time the program starts the same tabs load fine.
also I have a JMenu on the JInternalframe. it's action is in question.

If I use the JMenu to add an additonal JTabbedPane. What would this code need to do. (repaint(),serialize? I'm not sure how this would work.

When do you want to do this. . when the user clicks something or does something, or when the program first runs? If when the user clicks/does something, then add the JTabbedPane to the GUI, add the tabs to the tabbed pane, then call revalidate (or validate) on the frame that contains it.

Thanks for the reply. I will explore validate. I wanted to be able to add or delete tabs after start up.

Thank again.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.