Results 1 to 2 of 2
Thread: resize tabs in jtabbedpane
- 08-01-2007, 03:42 PM #1Member
- Join Date
- Jul 2007
- Rep Power
- 08-02-2007, 04:02 AM #2
I assume you are adding JLabels to the tabbedPane, each label with an ImageIcon.
Call pack on the top–level container to "fit" the tabbedPane. It will have the size of the largest label/image. Or you can add the tabbedPane to a container whose layout respects the tabbedPanes preferredSize, such as a GridBagLayout.
If an image is too big put the label in a JScrollPane.
- By Iyengar in forum AWT / SwingReplies: 1Last Post: 02-17-2008, 12:43 AM
- By blackstone in forum AWT / SwingReplies: 2Last Post: 11-14-2007, 04:15 PM
- By lenny in forum SWT / JFaceReplies: 1Last Post: 08-07-2007, 07:18 AM
- By lenny in forum AWT / SwingReplies: 1Last Post: 07-30-2007, 12:18 AM
- By paul in forum AWT / SwingReplies: 1Last Post: 07-16-2007, 05:11 PM