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) {
        int fontSize = 20;

        g.setFont(new Font("TimesRoman", Font.ITALIC, fontSize));

From source file Main.java

public class Main extends JPanel {

    public void paint(Graphics g) {
        int fontSize = 20;

        g.setFont(new Font("TimesRoman", Font.PLAIN, fontSize));

From source file Main.java

public class Main extends JPanel {

    public void paint(Graphics g) {
        int fontSize = 20;

        g.setFont(new Font("TimesRoman", Font.BOLD, fontSize));

From source file MainClass.java

public class MainClass extends JPanel {

    public void paint(Graphics g) {
        g.setColor(Color.red);

        g.drawRect(10, 10, 100, 100);

From source file Main.java

public class Main extends JPanel {

    public void paint(Graphics g) {
        int w = getSize().width;
        int midW = w / 2;

From source file Translation.java

public class Translation extends JPanel {

    public void paint(Graphics g) {
        super.paint(g);
        Graphics2D g2d = (Graphics2D) g;

From source file Rotate.java

public class Rotate extends JPanel {

    public void paint(Graphics g) {
        super.paint(g);
        Graphics2D g2d = (Graphics2D) g;
        g2d.setColor(new Color(150, 150, 150));

From source file Main.java

public class Main extends JPanel {

    public Main() {

        JButton btn1 = new JButton("Button1");
        JButton btn2 = new JButton("Button2");

From source file Main.java

public class Main extends JPanel {

    public Main() {

        JButton btn1 = new JButton("Button1");
        JButton btn2 = new JButton("Button2");

From source file MainClass.java

public class MainClass extends JPanel {

    public MainClass() {

        JButton btn1 = new JButton("Button1");
        JButton btn2 = new JButton("Button2");