i want to remove that tab header and make JTabbedPane look like an rectangle one.
no idea whats your goal
use
CardLayout
set
LineBorder
forJLabel
Question
Hi guys i writing an app that have JTabbedPane in it. but the problem is it's always have tab header on it.
i want to remove that tab header and make JTabbedPane look like an rectangle one.
Here my code:
public final static JTabbedPane getTabbedPane()
{
JTabbedPane jtp=new JTabbedPane();
jtp.add(new JLabel("Tab"));
jtp.add(new JLabel("Tab"));
jtp.add(new JLabel("Tab"));
jtp.add(new JLabel("Tab"));
return jtp;
}
Solution
i want to remove that tab header and make JTabbedPane look like an rectangle one.
no idea whats your goal
use CardLayout
set LineBorder
for JLabel
OTHER TIPS
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));