Example usage for javax.swing JTabbedPane setForeground

List of usage examples for javax.swing JTabbedPane setForeground

Introduction

In this page you can find the example usage for javax.swing JTabbedPane setForeground.

Prototype

@BeanProperty(preferred = true, visualUpdate = true, description = "The foreground color of the component.")
public void setForeground(Color fg) 

Source Link

Document

Sets the foreground color of this component.

Usage

From source file:Main.java

public static void main(String[] argv) throws Exception {
    JTabbedPane pane = new JTabbedPane();
    pane.setForeground(Color.YELLOW);
    pane.setBackground(Color.MAGENTA);
    String label = "Tab Label";
    pane.addTab(label, new JButton("Button"));

    int index = pane.getTabCount() - 1;

    pane.setForegroundAt(index, Color.ORANGE);
    pane.setBackgroundAt(index, Color.GREEN);
}