Example usage for java.awt Color darkGray

List of usage examples for java.awt Color darkGray

Introduction

In this page you can find the example usage for java.awt Color darkGray.

Prototype

Color darkGray

To view the source code for java.awt Color darkGray.

Click Source Link

Document

The color dark gray.

Usage

From source file:org.jfree.eastwood.GValueAxis3D.java

/**
 * Creates a new axis.//  w  w w  .  j av  a  2s  . co m
 */
public GValueAxis3D() {
    super();
    this.axisForAutoLabels = new NumberAxis3D(null);
    this.axisForAutoLabels.setRange(0.0, 100.0);
    this.axisForAutoLabels.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
    this.labelAxisStart = 0.0;
    this.labelAxisEnd = 100.0;
    this.tickLabels = new java.util.ArrayList();
    this.tickLabelPositions = new java.util.ArrayList();
    setLowerMargin(0.0);
    setUpperMargin(0.0);
    // the data is normalised into the range 0.0 to 1.0, so the real axis
    // has the same range...
    setRange(0.0, 1.0);
    setTickLabelPaint(Color.darkGray);
    setTickLabelFont(new Font("Dialog", Font.PLAIN, 11));
}

From source file:livecanvas.mesheditor.MeshEditor.java

public MeshEditor() {
    super("Mesh Editor", new ImageIcon(clazz.getResource("res/mesh_editor.png")), new BorderLayout());
    setPreferredSize(new Dimension(1024, 600));
    setBackground(Color.darkGray);

    tools = createTools();//from  w  w w .j a  v  a  2s.co  m
    add(tools, BorderLayout.WEST);

    selectedColor = Color.black;
    JPanel east = new JPanel(new BorderLayout());
    east.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
    Layer rootLayer = new Layer("ROOT");
    rootLayer.addSubLayer(new Layer("Layer1"));
    layersView = new LayersView(rootLayer);
    chain(layersView);
    layersView.addListener(this);
    east.add(layersView, BorderLayout.NORTH);
    propertiesPanel = new JPanel(new BorderLayout());
    east.add(propertiesPanel);
    viewpointsView = new ViewpointsView(layersView.getSelectedLayer());
    viewpointsView.addListener(this);
    east.add(viewpointsView, BorderLayout.SOUTH);
    add(east, BorderLayout.EAST);

    JPanel center = new JPanel(new BorderLayout());
    center.setBackground(Color.lightGray);
    canvas = new CanvasMesh(800, 600);
    canvas.setCurrLayer(getRootLayer());
    pointerHandler = new AffineTransformPointerHandler(canvas);
    canvas.setPointerHandler(pointerHandler);
    canvasContainer = new CanvasContainer(canvas);
    rootLayer.setCanvas(canvas);
    center.add(canvasContainer);

    renderImageSettings = new RenderImageSettings();
    settings = new MeshEditorSettings(canvas.getSettings(), layersView.getSettings(), renderImageSettings);

    add(center);
    layersView.layersList.setSelectedIndex(1);
    setSelectedToolType(TOOLS_BRUSH);
}

From source file:com.main.Welcome.java

/**
 * This method is called from within the constructor to initialize the form.
 * WARNING: Do NOT modify this code. The content of this method is always
 * regenerated by the Form Editor.//from  ww w .  j  ava 2s .c om
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    jPanel1 = new javax.swing.JPanel();
    jPanel2 = new javax.swing.JPanel();
    jButton1 = new javax.swing.JButton();
    jButton2 = new javax.swing.JButton();
    jButton3 = new javax.swing.JButton();
    jButton4 = new javax.swing.JButton();
    jPanel3 = new javax.swing.JPanel();
    jPanel4 = new javax.swing.JPanel();
    jScrollPane1 = new javax.swing.JScrollPane();
    jTable1 = new javax.swing.JTable();
    jPanel5 = new javax.swing.JPanel();
    jScrollPane2 = new javax.swing.JScrollPane();
    jTable2 = new javax.swing.JTable();
    jPanel6 = new javax.swing.JPanel();
    jScrollPane3 = new javax.swing.JScrollPane();
    jTable3 = new javax.swing.JTable();
    jButton5 = new javax.swing.JButton();
    jButton6 = new javax.swing.JButton();

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    setLocationByPlatform(true);
    setMaximumSize(new java.awt.Dimension(650, 400));
    setMinimumSize(new java.awt.Dimension(650, 400));
    setUndecorated(true);

    jPanel1.setBackground(new java.awt.Color(153, 153, 153));

    jPanel2.setBackground(new java.awt.Color(204, 204, 204));
    jPanel2.setLayout(new java.awt.BorderLayout());
    jPanel2.add(jButton1, java.awt.BorderLayout.CENTER);

    jButton2.setText("Patient List");
    jButton2.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED,
            java.awt.Color.lightGray, java.awt.Color.darkGray, java.awt.Color.lightGray,
            java.awt.Color.lightGray));
    jButton2.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton2ActionPerformed(evt);
        }
    });
    jPanel2.add(jButton2, java.awt.BorderLayout.PAGE_START);

    jButton3.setText("Lab Results");
    jButton3.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton3ActionPerformed(evt);
        }
    });
    jPanel2.add(jButton3, java.awt.BorderLayout.PAGE_END);

    jButton4.setText("Analytics");
    jButton4.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton4ActionPerformed(evt);
        }
    });
    jPanel2.add(jButton4, java.awt.BorderLayout.LINE_END);

    jPanel3.setLayout(new java.awt.CardLayout());

    jPanel4.setBackground(new java.awt.Color(153, 153, 153));

    jTable1.setModel(
            new javax.swing.table.DefaultTableModel(
                    new Object[][] { { null, null, null, null }, { null, null, null, null },
                            { null, null, null, null }, { null, null, null, null } },
                    new String[] { "Title 1", "Title 2", "Title 3", "Title 4" }));
    jScrollPane1.setViewportView(jTable1);

    javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
    jPanel4.setLayout(jPanel4Layout);
    jPanel4Layout
            .setHorizontalGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel4Layout.createSequentialGroup().addContainerGap().addComponent(jScrollPane1,
                            javax.swing.GroupLayout.DEFAULT_SIZE, 502, Short.MAX_VALUE)));
    jPanel4Layout.setVerticalGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 397, Short.MAX_VALUE));

    jPanel3.add(jPanel4, "card2");

    jPanel5.setBackground(new java.awt.Color(204, 204, 204));

    jTable2.setModel(
            new javax.swing.table.DefaultTableModel(
                    new Object[][] { { null, null, null, null }, { null, null, null, null },
                            { null, null, null, null }, { null, null, null, null } },
                    new String[] { "Title 1", "Title 2", "Title 3", "Title 4" }));
    jScrollPane2.setViewportView(jTable2);

    javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
    jPanel5.setLayout(jPanel5Layout);
    jPanel5Layout
            .setHorizontalGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane2, javax.swing.GroupLayout.Alignment.TRAILING,
                            javax.swing.GroupLayout.DEFAULT_SIZE, 512, Short.MAX_VALUE));
    jPanel5Layout.setVerticalGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane2, javax.swing.GroupLayout.Alignment.TRAILING,
                    javax.swing.GroupLayout.DEFAULT_SIZE, 397, Short.MAX_VALUE));

    jPanel3.add(jPanel5, "card2");

    jPanel6.setBackground(new java.awt.Color(153, 153, 153));

    jTable3.setModel(
            new javax.swing.table.DefaultTableModel(
                    new Object[][] { { null, null, null, null }, { null, null, null, null },
                            { null, null, null, null }, { null, null, null, null } },
                    new String[] { "Title 1", "Title 2", "Title 3", "Title 4" }));
    jScrollPane3.setViewportView(jTable3);

    javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
    jPanel6.setLayout(jPanel6Layout);
    jPanel6Layout
            .setHorizontalGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 512, Short.MAX_VALUE));
    jPanel6Layout.setVerticalGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane3, javax.swing.GroupLayout.Alignment.TRAILING,
                    javax.swing.GroupLayout.DEFAULT_SIZE, 397, Short.MAX_VALUE));

    jPanel3.add(jPanel6, "card2");

    jButton5.setText("BACK");
    jButton5.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton5ActionPerformed(evt);
        }
    });

    jButton6.setText("BAR CHART");
    jButton6.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton6ActionPerformed(evt);
        }
    });

    javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout.setHorizontalGroup(jPanel1Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup().addContainerGap()
                    .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addContainerGap())
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jButton6).addGap(84, 84, 84).addComponent(jButton5).addGap(24, 24, 24)));
    jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                    .addContainerGap()
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createSequentialGroup().addGap(11, 11, 11).addComponent(
                                    jButton5, javax.swing.GroupLayout.PREFERRED_SIZE, 18,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jButton6, javax.swing.GroupLayout.PREFERRED_SIZE, 18,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)))));

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
                    javax.swing.GroupLayout.PREFERRED_SIZE));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(
            jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
            Short.MAX_VALUE));

    pack();
    setLocationRelativeTo(null);
}

From source file:org.jfree.eastwood.GValueAxis.java

/**
 * Creates a new axis./*from   w ww .ja  v  a2 s. c o  m*/
 */
public GValueAxis() {
    super();
    this.axisForAutoLabels = new NumberAxis(null);
    this.axisForAutoLabels.setRange(0.0, 100.0);
    this.axisForAutoLabels.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
    this.labelAxisStart = 0.0;
    this.labelAxisEnd = 100.0;
    this.tickLabels = new java.util.ArrayList();
    this.tickLabelPositions = new java.util.ArrayList();
    setLowerMargin(0.0);
    setUpperMargin(0.0);
    // the data is normalised into the range 0.0 to 1.0, so the real axis
    // has the same range...
    setRange(0.0, 1.0);
    setTickLabelPaint(Color.darkGray);
    setTickLabelFont(new Font("Dialog", Font.PLAIN, 11));
}

From source file:org.gvsig.gui.beans.graphic.GraphicChartPanel.java

/**
 * Creates a chart.//from   www  . j  a v  a  2s  .com
 * @param dataset the dataset.
 * @return A chart.
 */
private void createChart() {
    chart = ChartFactory.createXYLineChart(null, null, null, dataset, PlotOrientation.VERTICAL, false, true,
            true);

    // Definir la lista de colores
    XYPlot plot = chart.getXYPlot();
    plot.getRenderer().setSeriesPaint(0, Color.red);
    plot.getRenderer().setSeriesPaint(1, Color.green);
    plot.getRenderer().setSeriesPaint(2, Color.blue);
    plot.getRenderer().setSeriesPaint(3, Color.cyan);
    plot.getRenderer().setSeriesPaint(4, Color.black);
    plot.getRenderer().setSeriesPaint(5, Color.darkGray);
    plot.getRenderer().setSeriesPaint(6, Color.gray);
    plot.getRenderer().setSeriesPaint(7, Color.magenta);
    plot.getRenderer().setSeriesPaint(8, Color.yellow);
    plot.getRenderer().setSeriesPaint(9, Color.orange);

    Image img = new ImageIcon(getClass().getResource("images/splash.png")).getImage();
    plot.setBackgroundPaint(null);
    plot.setBackgroundImageAlpha(0.18f);
    plot.setBackgroundImage(img);
}

From source file:de.quadrillenschule.azocamsyncd.gui.ExploreWifiSDPanel.java

/**
 * Creates new form ExploreWifiSDPanel//  w  w w.  j av a  2  s  .  c om
 */
public ExploreWifiSDPanel() {
    initComponents();
    rootNode = new DefaultMutableTreeNode("/");
    DefaultTreeModel dtm = new DefaultTreeModel(rootNode);
    remotejTree.setModel(dtm);
    remotejTree.addTreeSelectionListener(new TreeSelectionListener() {

        @Override
        public void valueChanged(TreeSelectionEvent e) {
            updateSingleView();
        }
    });
    remotejTree.setCellRenderer(new TreeCellRenderer() {

        @Override
        public Component getTreeCellRendererComponent(JTree tree, Object value, boolean selected,
                boolean expanded, boolean leaf, int row, boolean hasFocus) {
            JLabel retval = new JLabel(value.toString());
            AZoFTPFile myaffile = null;
            if (afs == null) {
                return retval;
            }
            for (AZoFTPFile af : afs) {
                if (new String(af.dir + af.ftpFile.getName()).equals(value.toString())) {
                    myaffile = af;
                    break;
                }
            }
            try {
                if (!myaffile.ftpFile.isDirectory()) {
                    if (!localStorage.getLocalFile(myaffile).exists()) {

                        if (!localStorage.isFileSynced(myaffile)) {
                            retval.setForeground(new Color(0, 20, 100));
                        }
                    } else {
                        retval.setForeground(new Color(20, 100, 0));
                    }
                }
            } catch (Exception ex) {
                //           Logger.getLogger(ExploreWifiSDPanel.class.getName()).log(Level.SEVERE, null, ex);
            }

            if (selected) {
                retval.setOpaque(true);
                retval.setBackground(Color.darkGray);
            }
            return retval;
        }
    });
}

From source file:ancat.visualizers.UndirectedModelVisualizer.java

private void produce(String fileName) {
    _currentLayout.setSize(new Dimension(600, 600));

    VisualizationImageServer<V, E> vv = new VisualizationImageServer<V, E>(_currentLayout,
            new Dimension(600, 600));

    vv.setPreferredSize(new Dimension(600, 600));

    // Setup up a new vertex to paint transformer...
    Transformer<V, Paint> vertexPaint = new Transformer<V, Paint>() {
        public Paint transform(V v) {
            //return Color.GREEN;
            ancat.common.Vertex vertex = (Vertex) v;

            if (vertex instanceof ancat.common.ExecutableFile)
                return Color.BLUE;

            if (vertex instanceof ancat.common.DynamicLibrary)
                return Color.YELLOW;

            if (vertex instanceof ancat.common.ConfigurationFile)
                return Color.ORANGE;

            if (vertex instanceof ancat.common.Unspecified)
                return Color.RED;

            return Color.darkGray;
        }//from www  .  ja v  a2  s.c om
    };
    // Set up a new stroke Transformer for the edges
    float dash[] = { 10.0f };

    final Stroke edgeStroke = new BasicStroke(1.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, 10.0f, dash,
            0.0f);

    Transformer<E, Stroke> edgeStrokeTransformer = new Transformer<E, Stroke>() {
        public Stroke transform(E s) {
            return edgeStroke;
        }
    };

    Transformer<E, Font> edgeFontTransformer = new Transformer<E, Font>() {
        public Font transform(E e) {
            return new Font("Dialog", Font.PLAIN, 10);
        }
    };

    Transformer<E, String> lblTransformer = new Transformer<E, String>() {
        public String transform(E e) {
            Edge edge = (Edge) e;
            //return edge.getXMLId();
            return edge.getXMLId() != null ? edge.getXMLId() : "";
        }
    };

    Transformer<V, Font> vertexFontTransformer = new Transformer<V, Font>() {
        public Font transform(V v) {
            return new Font("Dialog", Font.PLAIN, 10);
        }
    };

    Transformer<V, String> vLblTransformer = new Transformer<V, String>() {
        public String transform(V v) {
            Vertex vertex = (Vertex) v;
            return vertex.getElementID();
        }
    };

    vv.getRenderContext().setVertexFillPaintTransformer(vertexPaint);
    vv.getRenderContext().setEdgeStrokeTransformer(edgeStrokeTransformer);
    vv.getRenderContext().setVertexLabelTransformer(new ToStringLabeller<V>());
    vv.getRenderContext().setEdgeLabelTransformer(new ToStringLabeller<E>());
    // ---->
    vv.getRenderContext().setEdgeFontTransformer(edgeFontTransformer);
    vv.getRenderContext().setLabelOffset(20);
    vv.getRenderContext().setEdgeLabelTransformer(lblTransformer);

    vv.getRenderContext().setVertexFontTransformer(vertexFontTransformer);
    vv.getRenderContext().setVertexLabelTransformer(vLblTransformer);

    vv.getRenderer().getVertexLabelRenderer().setPosition(Position.N);

    BufferedImage img = new BufferedImage((int) _currentLayout.getSize().getWidth(),
            (int) _currentLayout.getSize().getHeight(), BufferedImage.TYPE_INT_ARGB);

    vv.getImage(new Point(0, 0), new Dimension(700, 700));

    Graphics2D g2d = (Graphics2D) img.getGraphics();

    vv.paint(g2d);

    setDisclaimer(g2d);

    g2d.dispose();

    try {
        File file = new File(fileName);

        ImageIO.write(img, "png", file);
    } catch (IOException e) {
        e.printStackTrace();
    }
}

From source file:de.dakror.villagedefense.game.entity.struct.Struct.java

@Override
public void draw(Graphics2D g) {
    g.drawImage(getImage(), (int) x, (int) y, Game.w);

    if (getAttackArea().getBounds().width > 0 && (clicked || hovered)) {
        Color oldColor = g.getColor();
        g.setColor(Color.darkGray);

        g.draw(getAttackArea());/*from   w w  w  .j  a  va2s . com*/
        g.setColor(oldColor);
    }

    // TODO: DEBUG
    // for (Vector p : structPoints.entries)
    // {
    // Vector v = p.clone();
    // v.mul(Tile.SIZE);
    // v.add(new Vector(x, y));
    //
    // Color old = g.getColor();
    // g.setColor(Color.green);
    // g.fillRect((int) v.x, (int) v.y, 4, 4);
    // g.setColor(old);
    // }
}

From source file:hudson.plugins.testlink.TestLinkGraph.java

/**
 * Creates TestLink trend graph.//from www.j  a  v a 2 s . com
 * 
 * @return the JFreeChart graph object.
 */
protected JFreeChart createGraph() {
    final JFreeChart chart = ChartFactory.createLineChart(null, null, yLabel, categoryDataset,
            PlotOrientation.VERTICAL, true, true, false);

    final LegendTitle legend = chart.getLegend();
    legend.setPosition(RectangleEdge.RIGHT);

    chart.setBackgroundPaint(Color.white);

    final CategoryPlot plot = (CategoryPlot) chart.getPlot();
    plot.setForegroundAlpha(0.8f);
    plot.setBackgroundPaint(Color.white);
    plot.setRangeGridlinePaint(Color.darkGray);

    final CategoryAxis domainAxis = new ShiftedCategoryAxis(xLabel);
    domainAxis.setCategoryLabelPositions(CategoryLabelPositions.UP_45);
    domainAxis.setLowerMargin(0.0);
    domainAxis.setUpperMargin(0.0);
    domainAxis.setCategoryMargin(0.0);
    plot.setDomainAxis(domainAxis);

    final NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();
    rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
    rangeAxis.setAutoRange(true);
    rangeAxis.setAutoRangeMinimumSize(5);
    rangeAxis.setLowerBound(0);

    final CategoryItemRenderer renderer = plot.getRenderer();

    renderer.setSeriesStroke(0, new BasicStroke(3.0f, BasicStroke.CAP_BUTT, BasicStroke.CAP_BUTT, 1.0f,
            new float[] { 1.0f, 1.0f }, 0.0f));
    renderer.setSeriesPaint(0, new Color(35, 20, 89));

    renderer.setSeriesStroke(1, new BasicStroke(3.0f, BasicStroke.CAP_BUTT, BasicStroke.CAP_BUTT, 1.0f,
            new float[] { 1.0f, 1.0f }, 0.0f));
    renderer.setSeriesPaint(1, new Color(0, 145, 0));

    renderer.setSeriesStroke(2, new BasicStroke(3.0f, BasicStroke.CAP_BUTT, BasicStroke.CAP_BUTT, 1.0f,
            new float[] { 1.0f, 1.0f }, 0.0f));
    renderer.setSeriesPaint(2, new Color(207, 69, 21));

    renderer.setSeriesStroke(3, new BasicStroke(3.0f, BasicStroke.CAP_BUTT, BasicStroke.CAP_BUTT, 1.0f,
            new float[] { 1.0f, 1.0f }, 0.0f));
    renderer.setSeriesPaint(3, Color.orange);

    plot.setInsets(new RectangleInsets(5.0, 0, 0, 5.0));

    return chart;
}

From source file:net.sf.jsfcomp.chartcreator.utils.ChartUtils.java

public static Color getColor(String color) {
    // HTML colors (#FFFFFF format)
    if (color.startsWith("#")) {
        return new Color(Integer.parseInt(color.substring(1), 16));
    } else {/*from   www  .j  a v a  2s. c  om*/
        // Colors by name
        if (color.equalsIgnoreCase("black"))
            return Color.black;
        if (color.equalsIgnoreCase("gray"))
            return Color.gray;
        if (color.equalsIgnoreCase("yellow"))
            return Color.yellow;
        if (color.equalsIgnoreCase("green"))
            return Color.green;
        if (color.equalsIgnoreCase("blue"))
            return Color.blue;
        if (color.equalsIgnoreCase("red"))
            return Color.red;
        if (color.equalsIgnoreCase("orange"))
            return Color.orange;
        if (color.equalsIgnoreCase("cyan"))
            return Color.cyan;
        if (color.equalsIgnoreCase("magenta"))
            return Color.magenta;
        if (color.equalsIgnoreCase("darkgray"))
            return Color.darkGray;
        if (color.equalsIgnoreCase("lightgray"))
            return Color.lightGray;
        if (color.equalsIgnoreCase("pink"))
            return Color.pink;
        if (color.equalsIgnoreCase("white"))
            return Color.white;

        throw new RuntimeException("Unsupported chart color:" + color);
    }
}