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

public class HelloInJapanese extends JPanel {

    static JFrame frame;

    static String helloInJapanese = "Hello in Japanese is konnichi wa, \u4eca\u65e5\u306f.";

From source file IconInterfaceDemo.java

public class IconInterfaceDemo extends JPanel {

    public IconInterfaceDemo() {
    }

    public static void main(String[] a) {

From source file Main.java

public class Main extends JPanel {
    private JEditorPane html;

    public Main() {
        setLayout(new BorderLayout());
        String text = "<html>one<br>two<br><a name =\"three\"></a>three<br>four<br>five<br>six<br>seven<br>eight<br>nine<br>ten</html>";

From source file DrawPolyPanel.java

public class DrawPolyPanel extends JPanel {
    public void paintComponent(Graphics g) {
        super.paintComponent(g);

        Polygon p = new Polygon();
        for (int i = 0; i < 5; i++)

From source file Main.java

public class Main extends JPanel {

    public void paint(Graphics g) {
        Graphics2D g2d = (Graphics2D) g;
        g2d.draw(getTextShape(g2d, "asdf", new Font("", 1, 30)));
    }

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);

        AttributedString as1 = new AttributedString("1234567890");

From source file BasicShapes.java

public class BasicShapes extends JPanel {

    public void paint(Graphics g) {
        Graphics2D g2d = (Graphics2D) g;
        getTextShape(g2d, "asdf", new Font("", 1, 1));

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);

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);

From source file MainClass.java

public class MainClass extends JPanel {

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

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