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

public class BasicShapes extends JPanel {

    public void paint(Graphics g) {
        Graphics2D g2d = (Graphics2D) g;
        drawParagraph(g2d, "adfasdfaf", 20);
    }

From source file Main.java

public class Main extends JPanel {

    public void paint(Graphics g) {
        Graphics2D g2d = (Graphics2D) g;
        drawParagraph(g2d, "adfasdfaf", 20);
    }

From source file Main.java

public class Main extends JPanel {
    public void paint(Graphics g) {
        Graphics2D g2d = (Graphics2D) g;
        g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);

        Font font = new Font("Serif", Font.PLAIN, 40);

From source file PaintingAndStroking.java

public class PaintingAndStroking extends JPanel {
    public void paint(Graphics g) {
        Graphics2D g2 = (Graphics2D) g;
        double x = 15, y = 50, w = 70, h = 70;
        Ellipse2D e = new Ellipse2D.Double(x, y, w, h);
        GradientPaint gp = new GradientPaint(75, 75, Color.white, 95, 95, Color.gray, true);

From source file MainClass.java

public class MainClass extends JPanel {

    public MainClass() {
        setLayout(new BorderLayout());

        JPanel jp = new JPanel();

From source file FillRectPanel.java

public class FillRectPanel extends JPanel {
    public void paintComponent(Graphics g) {
        super.paintComponent(g);
        g.drawRect(10, 10, 80, 30);
        g.drawRoundRect(100, 10, 80, 30, 15, 15);
        g.drawOval(10, 100, 80, 30);

From source file SimpleFont.java

public class SimpleFont extends JPanel {
    public void paint(Graphics g) {
        Graphics2D g2 = (Graphics2D) g;

        g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);

From source file Main.java

public class Main extends JPanel {

    public static void main(String[] args) {
        JFrame f = new JFrame("JTable");
        f.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
        f.add(new Main());

From source file Main.java

public class Main extends JPanel {

    public Main() {
        JRadioButton radMarriedYes = new JRadioButton(new AbstractAction("Yes") {

            @Override

From source file Main.java

public class Main extends JPanel {

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

        Ellipse2D e1 = new Ellipse2D.Double(20.0, 20.0, 80.0, 70.0);