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 Main() {
        super(new GridLayout(2, 2, 20, 30));
        add(new JButton("w w w.j a v a 2 s . c o m"));
        add(new JButton("w w w.j a v a 2 s . com"));

From source file Main.java

public class Main extends JPanel {

    public void paint(Graphics g) {
        Rectangle r = new Rectangle(50, 50, 100, 100);
        Rectangle r1 = new Rectangle(100, 100, 75, 75);
        g.drawRect(r.x, r.y, r.width, r.height);

From source file MainClass.java

public class MainClass extends JPanel {

    public void paint(Graphics g) {
        Rectangle r = new Rectangle(50, 50, 100, 100);
        Rectangle r1 = new Rectangle(100, 100, 75, 75);
        g.drawRect(r.x, r.y, r.width, r.height);

From source file MainClass.java

public class MainClass extends JPanel {

    public void paint(Graphics g) {
        int xpoints[] = { 25, 145, 25, 145, 25 };
        int ypoints[] = { 25, 25, 145, 145, 25 };
        int npoints = 5;

From source file MainClass.java

public class MainClass extends JPanel {

    public void paint(Graphics g) {
        int xpoints[] = { 25, 145, 25, 145, 25 };
        int ypoints[] = { 25, 25, 145, 145, 25 };
        int npoints = 5;

From source file Main.java

public class Main extends JPanel {

    JButton jbt1 = new JButton("Button1");
    JButton jbt2 = new JButton("Button2");
    JButton jbt3 = new JButton("Button3");
    JButton jbt4 = new JButton("Button4");

From source file Main.java

public class Main extends JPanel {
    public Main() {

        FlowLayout flowLayout = new FlowLayout(FlowLayout.RIGHT, 10, 3);
        setLayout(flowLayout);

From source file Main.java

public class Main extends JPanel {
    public Main() {

        FlowLayout flowLayout = new FlowLayout(FlowLayout.RIGHT, 10, 3);
        setLayout(flowLayout);

From source file Main.java

public class Main extends JPanel {
    public Main() {

        FlowLayout flowLayout = new FlowLayout(FlowLayout.RIGHT, 10, 3);
        setLayout(flowLayout);

From source file Main.java

public class Main extends JPanel {
    public Main() {

        FlowLayout flowLayout = new FlowLayout(FlowLayout.RIGHT, 10, 3);
        setLayout(flowLayout);