Results 1 to 2 of 2
Thread: resize tabs in jtabbedpane
- 08-01-2007, 02:42 PM #1Member
- Join Date
- Jul 2007
- Rep Power
- 08-02-2007, 03: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-16-2008, 11:43 PM
- By blackstone in forum AWT / SwingReplies: 2Last Post: 11-14-2007, 03:15 PM
- By lenny in forum SWT / JFaceReplies: 1Last Post: 08-07-2007, 06:18 AM
- By lenny in forum AWT / SwingReplies: 1Last Post: 07-29-2007, 11:18 PM
- By paul in forum AWT / SwingReplies: 1Last Post: 07-16-2007, 04:11 PM