List of usage examples for java.awt Color RED
Color RED
To view the source code for java.awt Color RED.
Click Source Link
From source file:Main.java
public void paint(Graphics g) { g.setColor(Color.RED); g.clearRect(0, 0, 100, 100); }
From source file:Main.java
public void paint(Graphics g) { g.setColor(Color.red); g.drawRect(0, 0, 100, 100); g.clipRect(25, 25, 50, 50); g.drawLine(0, 100, 100, 0); }
From source file:MyCanvas.java
public void paint(Graphics g) { g.setColor(Color.RED); g.fill3DRect(20, 20, 200, 200, true); }
From source file:MyCanvas.java
public void paint(Graphics g) { g.setColor(Color.RED); g.fillArc(20, 20, 200, 200, 200, 200); }
From source file:MyCanvas.java
public void paint(Graphics g) { g.setColor(Color.RED); g.drawString("text", 20, 30); }
From source file:Main.java
public void paint(Graphics g) { g.setColor(Color.red); Graphics clippedGraphics = g.create(); clippedGraphics.drawRect(0, 0, 100, 100); clippedGraphics.clipRect(25, 25, 50, 50); clippedGraphics.drawLine(0, 0, 100, 100); clippedGraphics.dispose();//from ww w. java 2s . c o m clippedGraphics = null; g.drawLine(0, 100, 100, 0); }
From source file:Main.java
public void paint(Graphics g) { g.setColor(Color.red); Graphics clippedGraphics = g.create(); clippedGraphics.drawRect(0, 0, 100, 100); clippedGraphics.clipRect(25, 25, 50, 50); clippedGraphics.drawLine(0, 0, 100, 100); clippedGraphics.finalize();/*from w w w . j a v a 2 s. com*/ clippedGraphics = null; g.drawLine(0, 100, 100, 0); }
From source file:MainClass.java
public void paint(Graphics g) { g.setColor(Color.red); g.drawRect(10, 10, 100, 100); }
From source file:StylesExample7.java
public static void createDocumentStyles(StyleContext sc) { Style defaultStyle = sc.getStyle(StyleContext.DEFAULT_STYLE); // Create and add the main document style Style mainStyle = sc.addStyle(mainStyleName, defaultStyle); StyleConstants.setLeftIndent(mainStyle, 16); StyleConstants.setRightIndent(mainStyle, 16); StyleConstants.setFirstLineIndent(mainStyle, 16); StyleConstants.setFontFamily(mainStyle, "serif"); StyleConstants.setFontSize(mainStyle, 12); // Create and add the constant width style Style cwStyle = sc.addStyle(charStyleName, null); StyleConstants.setFontFamily(cwStyle, "monospaced"); StyleConstants.setForeground(cwStyle, Color.green); // Create and add the heading style Style heading2Style = sc.addStyle(heading2StyleName, null); StyleConstants.setForeground(heading2Style, Color.red); StyleConstants.setFontSize(heading2Style, 16); StyleConstants.setFontFamily(heading2Style, "serif"); StyleConstants.setBold(heading2Style, true); StyleConstants.setLeftIndent(heading2Style, 8); StyleConstants.setFirstLineIndent(heading2Style, 0); }
From source file:org.jfree.chart.demo.CompassDemo1.java
private static JFreeChart createChart(ValueDataset valuedataset) { CompassPlot compassplot = new CompassPlot(valuedataset); compassplot.setSeriesNeedle(7);//ww w. j av a 2 s. c o m compassplot.setSeriesPaint(0, Color.black); compassplot.setSeriesOutlinePaint(0, Color.black); compassplot.setRosePaint(Color.red); compassplot.setRoseHighlightPaint(Color.gray); compassplot.setRoseCenterPaint(Color.white); compassplot.setDrawBorder(false); JFreeChart jfreechart = new JFreeChart(compassplot); return jfreechart; }