Results 1 to 2 of 2
- 07-26-2012, 09:43 PM #1
Member
- Join Date
- Feb 2012
- Posts
- 26
- Rep Power
- 0
Putting the content (code) for each tab into a different class
Hi,
My application has a few tabs. It's getting hectic having the code for all tabs in a single class. So I decided to move the code for each tab into a separate class.
So now I have a class that represents the main window.
I put the code for each tab into a new class which extends JPanel.
I was hoping that I could add the tabs to the tabbedPane in my main window class like this:
.
.
tabbedPane.add("first tab", new FirstTab());
tabbedPane.add("second tab", new SecondTab());
.
.
(Where FirstTab and SecondTab are the name of the classes that have the code for thaose tabs).
This approach isnt't working; the tabs get displayed but nothing gets displayed onto the tabs.
Any help would be appreciated
Thank you
- 07-26-2012, 09:48 PM #2
Senior Member
- Join Date
- Oct 2010
- Location
- Germany
- Posts
- 780
- Rep Power
- 4
Similar Threads
-
Putting randomized classes that run when you run another class
By GiorgioCasini in forum New To JavaReplies: 1Last Post: 01-26-2012, 07:11 PM -
I need help with putting a logo on my code
By MikeJ39 in forum New To JavaReplies: 13Last Post: 10-22-2011, 01:10 AM -
Read content from URL with an http response code=204
By jmu2101 in forum NetworkingReplies: 5Last Post: 09-27-2011, 07:02 PM -
Repair source code content....!!!
By khoilh in forum New To JavaReplies: 2Last Post: 10-03-2009, 12:51 AM -
Putting code together.
By newbee in forum New To JavaReplies: 3Last Post: 04-17-2008, 03:53 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks