Reputation: 553
How to add an icon on the left side of JTabbedPane
while using JPanel
as the component of
JTabbedPane
?
As I know how to add icon on the left side of the JTabbedPane
while using JLabel
but
don't know what to do in case of JPanel
Upvotes: 0
Views: 364
Reputation: 347334
I assume you mean the JTabbedPane
's tab component. If you are using a JPanel
, you will need to add a JLabel
to the panel and apply an appropriate layout manager to position the elements the way you want them
There is an example in the How to Use Tabbed Panes under the section Tabs With Custom Components, it does add a JButton
to the right hand side, but I'm sure you can figure out how to switch to a JLabel
on the left side...
Upvotes: 1