Results 1 to 2 of 2
Thread: Tabbed Panes
- 10-15-2012, 10:52 PM #1
Member
- Join Date
- Oct 2012
- Posts
- 1
- Rep Power
- 0
Tabbed Panes
I am taking a class in JAVA and I have several little programs written in separate classes. Now I need to add these to a TabbedPane. I can create a tabbed pane that display messages and the tab names, but what do I do to get my tabs to bring up my programs. Here is a snipped of the code I have. Which displays the tab with the a "Welcome" message and labels the tab Tab#1. Now I need to be able to tell this tab to put the program there so I can run it from the tab. Thanks for any help anyone can provide.
public class TabbedPane extends JFrame
{
public TabbedPane()
{
super( "Test Company Name " );
JTabbedPane tab = new JTabbedPane();
JLabel l1 = new JLabel( "Welcome", SwingConstants.CENTER );
JPanel p1 = new JPanel();
p1.add( l1 );
tab.addTab( "Tab#1", null, p1, " Panel #1" );
- 10-24-2012, 11:48 PM #2
Re: Tabbed Panes
So, you don't really want an app to actually launch other apps. Rather, you'll have an app that might incorporate many other classes. The app contains the GUI, and when a user clicks on a tab, the app populates that tab with fields and data that might be derived from a particular class.
Similar Threads
-
Formatting contents within Tabbed Panes
By Redefine12 in forum AWT / SwingReplies: 6Last Post: 03-21-2012, 04:11 PM -
JTab Panes
By Nidi in forum New To JavaReplies: 2Last Post: 03-02-2011, 04:27 AM -
Layered Panes
By teckno101 in forum AWT / SwingReplies: 1Last Post: 10-03-2009, 11:16 PM -
panes, frames and ddm's :|
By skatefreak in forum New To JavaReplies: 1Last Post: 08-09-2009, 10:21 AM -
Two content panes in one GUI?
By Leprechaun in forum New To JavaReplies: 1Last Post: 01-31-2008, 04:02 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks