How to hide title from Jtabbedpane tabs?

Asked

Viewed 357 times

1

I need to hide the titles of JTabbedPane because I’m creating my own buttons to access the tabs.

2 answers

3

Skywalker

I don’t know if there’s such a thing setTabVisible(boolean b). But you can use the JTabbedPane setTabComponentAt:

jTabbedPane1.setTabComponentAt(int index, Component c); 

You must do for every tab. Send null as component will not work, but try sending a panel with zero width and height.

1


I managed to solve using Cardlayout, it is made for this

How to use.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.