Example usage for java.awt SystemColor inactiveCaption

List of usage examples for java.awt SystemColor inactiveCaption

Introduction

In this page you can find the example usage for java.awt SystemColor inactiveCaption.

Prototype

SystemColor inactiveCaption

To view the source code for java.awt SystemColor inactiveCaption.

Click Source Link

Document

The color rendered for the window-title background of inactive windows.

Usage

From source file:Main.java

public static void main(String[] a) {
    Color[] sysColor = new Color[] { SystemColor.activeCaption, SystemColor.activeCaptionBorder,
            SystemColor.activeCaptionText, SystemColor.control, SystemColor.controlDkShadow,
            SystemColor.controlHighlight, SystemColor.controlLtHighlight, SystemColor.controlShadow,
            SystemColor.controlText, SystemColor.desktop, SystemColor.inactiveCaption,
            SystemColor.inactiveCaptionBorder, SystemColor.inactiveCaptionText, SystemColor.info,
            SystemColor.infoText, SystemColor.menu, SystemColor.menuText, SystemColor.scrollbar,
            SystemColor.text, SystemColor.textHighlight, SystemColor.textHighlightText,
            SystemColor.textInactiveText, SystemColor.textText, SystemColor.window, SystemColor.windowBorder,
            SystemColor.windowText };

    for (Color c : sysColor) {
        System.out.println(c);//from  w  ww.  j  a v  a 2  s . c  om

    }

}

From source file:com.MainChart.java

public MainChart(String applicationTitle, String chartTitle) throws IOException {
    super(applicationTitle);
    this.multiHashtable = new Hashtable<>();
    // This will create the dataset 
    // PieDataset dataset = createDataset();
    // based on the dataset we create the chart
    final JFreeChart chart = ChartFactory.createBarChart("GPA Analysis By Country", // chart title
            "Country", // domain axis label
            "GPA", // range axis label
            createDataset(), // data
            PlotOrientation.VERTICAL, // orientation
            true, // include legend
            true, // tooltips?
            false // URLs?
    );//  w w  w .jav a 2s  .  c  o m

    chart.setBackgroundPaint(Color.white);
    CategoryPlot plot = chart.getCategoryPlot();
    plot.setBackgroundPaint(Color.lightGray);
    plot.setDomainGridlinePaint(Color.white);
    plot.setRangeGridlinePaint(Color.white);

    plot.setBackgroundPaint(SystemColor.inactiveCaption);//change background color

    //set  bar chart color

    //CategoryItemRenderer renderer = new CustomRenderer(); 
    //plot.setRenderer(renderer);
    // we put the chart into a panel
    ChartPanel chartPanel = new ChartPanel(chart);
    // default size
    chartPanel.setPreferredSize(new java.awt.Dimension(500, 270));
    // add it to our application
    setContentPane(chartPanel);

}