posted 14 years ago
If you move the code that creates your panels from one file to their own, that suggests you will be creating new classes for each panel. So, to add those panels to your JTabbedPane, you would do something like:
tabbedPane.addTab("Tab 1", icon, new PanelOnePane( possible arguments ),
"Does nothing");
where PanelOnePane( possible arguments ) is a panel building class that you separated from your current single file that would extend JPanel.
Of course, you could instantiate the PanelOnePane before adding it to your tabbedPane with
PanelOnePane panelOnePane = new PanelOnePane( possible arguments );
Make sense?
Always learning Java, currently using Eclipse on Fedora.
Linux user#: 501795