List of usage examples for javax.swing JComponent subclass-usage
From source file BasicDraw.java
class MyComponent extends JComponent { public void paint(Graphics g) { Graphics2D g2d = (Graphics2D) g; Shape shape = new java.awt.geom.Ellipse2D.Float(20, 20, 200, 200); g2d.setClip(shape);
From source file Main.java
class MyComponent extends JComponent { public void paint(Graphics g) { Graphics2D g2d = (Graphics2D) g; RenderingHints rhints = g2d.getRenderingHints(); boolean antialiasOn = rhints.containsValue(RenderingHints.VALUE_ANTIALIAS_ON); g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
From source file BasicDraw.java
class MyComponent extends JComponent { public void paint(Graphics g) { Graphics2D g2d = (Graphics2D) g; float strokeThickness = 5.0f;
From source file BasicDraw.java
class MyComponent extends JComponent { public void paint(Graphics g) { Graphics2D g2d = (Graphics2D) g; AffineTransform tx = new AffineTransform();
From source file BasicDraw.java
class MyComponent extends JComponent { public void paint(Graphics g) { Graphics2D g2d = (Graphics2D) g; AffineTransform tx = new AffineTransform();
From source file BasicDraw.java
class MyComponent extends JComponent { public void paint(Graphics g) { Graphics2D g2d = (Graphics2D) g; AffineTransform tx = new AffineTransform();
From source file BasicDraw.java
class MyComponent extends JComponent { public void paint(Graphics g) { Graphics2D g2d = (Graphics2D) g; AffineTransform tx = new AffineTransform();
From source file BasicDraw.java
class MyComponent extends JComponent { public void paint(Graphics g) { Font font = new Font("Serif", Font.PLAIN, 12); g.setFont(font); g.drawString("a String", 10, 10);
From source file BasicDraw.java
class MyComponent extends JComponent { public void paint(Graphics g) { Graphics2D g2d = (Graphics2D) g; g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_OFF); }
From source file BasicDraw.java
class MyComponent extends JComponent { public void paint(Graphics g) { Graphics2D g2d = (Graphics2D) g; g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF); }