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() {
        JRadioButton radMarriedYes = new JRadioButton("Yes", new ImageIcon("img/icon.gif"));
        JRadioButton radMarriedNo = new JRadioButton("No?", false);
        JRadioButton radGolfYes = new JRadioButton("Yes?", false);

From source file PrintLineByLine.java

public class PrintLineByLine extends JPanel {

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

        Graphics2D g2d = (Graphics2D) g;

From source file MainClass.java

public class MainClass extends JPanel {

    public MainClass() {
        JLabel jl = new JLabel(new MyIcon(), JLabel.CENTER);

        add(jl);

From source file Main.java

public class Main extends JPanel {

    public Main() {
        JLabel jl = new JLabel(new MyIcon(), JLabel.CENTER);

        add(jl);

From source file Main.java

public class Main extends JPanel {

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

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

From source file Main.java

public class Main extends JPanel {
    int TA_ROWS = 25;
    int TA_COLS = 60;
    JTextField inputField = new JTextField();
    JTextArea talkArea = new JTextArea(TA_ROWS, TA_COLS);

From source file Main.java

public class Main extends JPanel {

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

        Rectangle r = new Rectangle(20, 20, 200, 200);

From source file Main.java

public class Main extends JPanel {

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

        g2.setPaint(Color.black);

From source file TryCardLayout.java

public class TryCardLayout extends JPanel implements ActionListener {
    CardLayout card = new CardLayout(50, 50); // Create layout

    public TryCardLayout() {
        setLayout(card);
        JButton button;

From source file Main.java

public class Main extends JPanel implements KeyListener {
    public Main() {
        addKeyListener(this);
    }

    public void keyPressed(KeyEvent evt) {