tabbedPane = new JTabbedPane();
tabbedPane.addTab( "Page 1", class1);
tabbedPane.addTab( "Page 2", class2);
tabbedPane.addTab( "Page 3", class3);
topPanel.add( tabbedPane, BorderLayout.CENTER );
can i put 3 classes here? How?
tabbedPane = new JTabbedPane();
tabbedPane.addTab( "Page 1", class1);
tabbedPane.addTab( "Page 2", class2);
tabbedPane.addTab( "Page 3", class3);
topPanel.add( tabbedPane, BorderLayout.CENTER );
can i put 3 classes here? How?
Start by taking a read through How to Use Tabbed Panes
You can only instance of classes that extend from Component
, so assuming your three classes extend from Component
, you shouldn't have any issues