'Hide tab header in java
I have Tabbed Pane with three tabs.
How to hide the header of these tabs to prevent the user from pressing on them?
I used to do it in c# by creating a class inherited from tab component class and then override the method to hide the tabs, but recently i switch to java and i searched a lot without reaching any result.
Solution 1:[1]
Yes, Here is an clean example, it works for me :
JPanel panelOutils = new JPanel();
panelOutils.add(ongletOutils);
JScrollPane scrollOutils = new JScrollPane(panelOutils,JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
JTabbedPane jTabbedPaneOutils = new JTabbedPane();
// With Tab header
jTabbedPaneOutils.add(scrollOutils);
this.addTab("Outils", jTabbedPaneOutils);
// Delete tab header
this.addTab("Outils", jTabbedPaneOutils.add(scrollOutils));
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | berachad ayoub |
