Example usage for javax.swing JPanel subclass-usage

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

Introduction

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

Usage

From source file Main.java

public class Main extends JPanel {

    public void paint(Graphics g) {
        Graphics2D g2 = (Graphics2D) g;
        g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
        Font font = new Font("Serif", Font.PLAIN, 96);

From source file Main.java

public class Main extends JPanel {

    public void paint(Graphics g) {
        Shape shape = new Rectangle2D.Float(100, 50, 80, 80);

        Graphics2D g2 = (Graphics2D) g;

From source file Main.java

public class Main extends JPanel {

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

        Rectangle r = new Rectangle(10, 10);

From source file Main.java

public class Main extends JPanel {
    JButton button = new JButton("click frame not me");

    public Main() {
        setLayout(null);
        add(button);

From source file Main.java

public class Main extends JPanel {

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

        Rectangle r = new Rectangle(10, 10, 50, 40);

From source file Main.java

public class Main extends JPanel {

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

        Rectangle r = new Rectangle(10, 10, 50, 40);

From source file Main.java

public class Main extends JPanel {

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

        Rectangle r = new Rectangle(new Dimension(10, 10));

From source file TransparentRectangles.java

public class TransparentRectangles extends JPanel {

    public void paint(Graphics g) {
        super.paint(g);
        Graphics2D g2d = (Graphics2D) g;
        for (int i = 1; i <= 10; i++) {

From source file Main.java

public class Main extends JPanel implements ItemListener {
    public Main() {
        JCheckBox cb = new JCheckBox("www.java2s.com");
        cb.addItemListener(this);
        add(cb);
    }

From source file MainClass.java

public class MainClass extends JPanel implements ActionListener {
    JTextField jtf = new JTextField(15);

    public MainClass() {

        add(jtf);