List of usage examples for java.awt Graphics fillOval
public abstract void fillOval(int x, int y, int width, int height);
From source file:Main.java
@Override public void paintIcon(Component c, Graphics g, int x, int y) { g.setColor(color);/*from www. j a v a 2s. c o m*/ g.fillOval(x, y, w, h); }
From source file:MainClass.java
public void paint(Graphics g) { g.drawOval(10, 10, 50, 50); g.fillOval(100, 10, 75, 50); g.drawOval(190, 10, 90, 30); g.fillOval(70, 90, 140, 100); }
From source file:Main.java
@Override protected void paintComponent(Graphics g) { super.paintComponent(g); g.setColor(Color.RED);//from www . j a v a 2s . com g.fillOval(x, y - radius, radius * 2, radius * 2); }
From source file:Main.java
public void paintIcon(Component c, Graphics g, int x, int y) { g.setColor(Color.RED);/*from w w w . ja va 2s . c o m*/ if (c.isEnabled()) { g.fillOval(x, y, getIconWidth(), getIconHeight()); } else { g.drawOval(x, y, getIconWidth(), getIconHeight()); } }
From source file:BouncingCircle.java
/** This method simply draws the circle at its current position */ public void paint(Graphics g) { g.setColor(Color.red);//from w w w . j a v a 2 s . co m g.fillOval(x - r, y - r, r * 2, r * 2); }
From source file:MainClass.java
public void paint(Graphics g) { g.drawString(g.getClipBounds().toString(), 10, 30); g.clipRect(10, 40, getSize().width - 20, getSize().height - 80); g.fillOval(0, 0, getSize().width, getSize().height); String newClip = g.getClipBounds().toString(); g.setClip(0, 0, getSize().width, getSize().height); g.drawString(newClip, 10, getSize().height - 10); }
From source file:Main.java
public void paint(Graphics g) { g.drawString(g.getClipBounds().toString(), 10, 30); g.clipRect(10, 40, getSize().width - 20, getSize().height - 80); g.fillOval(0, 0, getSize().width, getSize().height); String newClip = g.getClipBounds().toString(); g.setClip(0, 0, getSize().width, getSize().height); g.drawString(newClip, 10, getSize().height - 10); }
From source file:Main.java
@Override public void paintComponent(Graphics g) { super.paintComponent(g); Dimension size = this.getSize(); int d = Math.min(size.width, size.height) - 10; int x = (size.width - d) / 2; int y = (size.height - d) / 2; g.fillOval(x, y, d, d); g.setColor(Color.blue);/* w w w . j a v a 2s .c o m*/ }
From source file:Main.java
@Override protected void paintIndeterminate(Graphics g, JComponent c) { Graphics2D g2d = (Graphics2D) g; g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); r = getBox(r);//from w w w. j ava2 s. co m g.setColor(progressBar.getForeground()); g.fillOval(r.x, r.y, r.width, r.height); }
From source file:Main.java
public void paint(Graphics g) { Dimension d = getSize();// w ww.jav a2 s .c o m int h = d.height; int w = d.width; g.setColor(color); if (rectangular) { g.fillRect(0, 0, w - 1, h - 1); } else { g.fillOval(0, 0, w - 1, h - 1); } }