Example usage for javax.swing JComponent subclass-usage

List of usage examples for javax.swing JComponent subclass-usage

Introduction

In this page you can find the example usage for javax.swing JComponent subclass-usage.

Usage

From source file RedBlueBox.java

public class RedBlueBox extends JComponent {

    public void paintComponent(Graphics g) {
        Insets insets = getInsets();
        int endX = getWidth() - insets.right;
        int endY = getHeight() - insets.bottom;

From source file mainDraw.java

class mainDraw extends JComponent {

    public int x = 50;
    public int y = 50;

    public void paintComponent(Graphics g) {

From source file Main.java

public class Main extends JComponent implements MouseMotionListener {
    static int imageWidth = 60, imageHeight = 60;
    int imageX, imageY;

    Image image;

From source file Main.java

public class Main extends JComponent implements MouseMotionListener {
    static int imageWidth = 60, imageHeight = 60;
    int imageX, imageY;

    Image image;

From source file Main.java

public class Main extends JComponent implements MouseMotionListener {
    static int imageWidth = 60, imageHeight = 60;
    int imageX, imageY;

    Image image;

From source file Main.java

public class Main extends JComponent implements MouseMotionListener {
    static int imageWidth = 60, imageHeight = 60;
    int imageX, imageY;

    Image image;

From source file DragImage.java

public class DragImage extends JComponent implements MouseMotionListener {
    static int imageWidth = 60, imageHeight = 60;
    int imageX, imageY;

    Image image;

From source file MyCanvas.java

class MyCanvas extends JComponent {
    private BufferedImage offImg;

    public void draw(Graphics g) {
        Graphics2D g2 = (Graphics2D) g;

From source file BasicDraw.java

class MyComponent extends JComponent {
    public void paint(Graphics g) {

        ImageIcon icon = new ImageIcon("a.png");
        int x = 0;
        int y = 100;

From source file Main.java

class MyComponent extends JComponent {
    public void paint(Graphics g) {
        Graphics2D g2d = (Graphics2D) g;
        g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);
    }
}