Quantcast
Channel: Examples Java Code Geeks » JTabbedPane
Viewing all articles
Browse latest Browse all 8

Set tab color in JTabbedPane

$
0
0
With this example we shall see how to set tab color in JTabbedPane. In order to do that, one should follows these steps: Create a new JFrame. Call frame.getContentPane().setLayout(new GridLayout(1, 1) to set up grid layout for the frame. Use JTabbedPane(JTabbedPane.TOP) to get a JTabbedPane. Use tabbedPane.setForeground(Color.green) to set foreground color. Use tabbedPane.setBackground(Color.red) to set the background color. Use tabbedPane.addTab to add a tool tip. ...

Viewing all articles
Browse latest Browse all 8

Trending Articles