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 Colors.java

public class Colors extends JPanel {

    public void paintComponent(Graphics g) {
        super.paintComponent(g);

        Graphics2D g2d = (Graphics2D) g;

From source file Main.java

public class Main extends JPanel {

    public void paint(Graphics g) {
        Graphics2D g2 = (Graphics2D) g;
        int w = getSize().width;
        int h = getSize().height;

From source file Main.java

public class Main extends JPanel {

    public void paint(Graphics g) {
        Graphics2D g2 = (Graphics2D) g;
        int w = getSize().width;
        int h = getSize().height;

From source file RoundedLineBorder.java

public class RoundedLineBorder extends JPanel {

    public RoundedLineBorder() {
        super(true);
        setLayout(new BorderLayout());

From source file RotateTransformed.java

public class RotateTransformed extends JPanel {

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

        Ellipse2D e = new Ellipse2D.Double(0, 0, 80, 130);

From source file NotHelloWorldPanel.java

public class NotHelloWorldPanel extends JPanel {
    public void paintComponent(Graphics g) {
        super.paintComponent(g);
        g.drawString("Java Source and Support", 75, 100);
    }

From source file Main.java

public class Main extends JPanel {

    public Main() {
        JRadioButton radMarriedYes = new JRadioButton("Yes", new ImageIcon("img/icon.gif"), false);
        JRadioButton radMarriedNo = new JRadioButton("No?", false);
        JRadioButton radGolfYes = new JRadioButton("Yes?", false);

From source file Main.java

public class Main extends JPanel {

    public Main() {
        JRadioButton radMarriedYes = new JRadioButton(new ImageIcon("img/icon.gif"), false);
        JRadioButton radMarriedNo = new JRadioButton("No?", false);
        JRadioButton radGolfYes = new JRadioButton("Yes?", false);

From source file Main.java

public class Main extends JPanel {

    public Main() {
        JRadioButton radMarriedYes = new JRadioButton(new ImageIcon("img/icon.gif"));
        JRadioButton radMarriedNo = new JRadioButton("No?", false);
        JRadioButton radGolfYes = new JRadioButton("Yes?", false);

From source file Main.java

public class Main extends JPanel {
    static int N = 8, SIZE = 75;

    public Main() {
        super(new GridLayout(N, N));
        this.setPreferredSize(new Dimension(N * SIZE, N * SIZE));