You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:
have access to post topics
communicate privately with other members (PM)
not see advertisements between posts
have the possibility to earn one of our surprises if you are an active member
access many other special features that will be introduced later.
I have created tabs using jtabbedpane, and want to put only image icons.
but this tab is not fitting into an image size
Tab should be fitted as image size
any ideas or suggestions??
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.