Results 1 to 3 of 3
Thread: JTab Panes
- 02-28-2011, 05:58 AM #1
Member
- Join Date
- Feb 2011
- Posts
- 4
- Rep Power
- 0
JTab Panes
Hi...
Can anyone tell me how to increase the size of tabs in JTabbedPane();
I used the following code...
JTabbedPane tab = new JTabbedPane();
tab.setSize(new Dimension(50,50));
Component temporaryLostComponent=null;
tab.add(temporaryLostComponent, "tab1");
tab.add(temporaryLostComponent, "tab2");
tab.add(temporaryLostComponent, "tab3");
jp1.setVisible(true);
******************************************
i found no difference after setting the size:(
do i need to add anything extra????:confused:
Thanks
- 03-01-2011, 04:08 AM #2
Member
- Join Date
- Feb 2011
- Posts
- 18
- Rep Power
- 0
I found this way of setting tab width using html but i have no idea if it works:
taken from:Java Code:tabbedPane.addTab("<html><body leftmargin=15 topmargin=8 marginwidth=15 marginheight=5>Tab1</body></html>", new JLabel("Text Component 1"));
Change the tab size of JTabbedPane
Edit: I just tried it and it does workLast edited by mr_guy; 03-01-2011 at 04:13 AM.
- 03-02-2011, 04:27 AM #3
Member
- Join Date
- Feb 2011
- Posts
- 4
- Rep Power
- 0
Similar Threads
-
added a 3rd tab to jtab pane now i get an exception error??
By Marshall in forum New To JavaReplies: 9Last Post: 05-13-2010, 05:29 AM -
multiple panes problem
By grease_monkey1986 in forum AWT / SwingReplies: 1Last Post: 05-09-2010, 01:06 PM -
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