Example usage for javax.swing JFrame subclass-usage

List of usage examples for javax.swing JFrame subclass-usage

Introduction

In this page you can find the example usage for javax.swing JFrame subclass-usage.

Usage

From source file DocumentListenerDemo.java

public class DocumentListenerDemo extends JFrame implements DocumentListener {
    private JTextField hourField = new JTextField("12", 3);

    private JTextField minuteField = new JTextField("00", 3);

    private JLabel label = new JLabel();

From source file Main.java

public class Main extends JFrame implements DragGestureListener {
    DragSource ds = new DragSource();
    String[] items = { "Java", "C", "C++", "Lisp", "Perl", "Python" };
    JList jl = new JList(items);

    public Main() {

From source file Main.java

public class Main extends JFrame implements DragGestureListener {
    String[] items = { "Java", "C", "C++", "Lisp", "Perl", "Python" };
    DragSource ds = new DragSource();
    JList jl = new JList(items);

    public Main() {

From source file Main.java

public class Main extends JFrame {
    JTextField textField = new JTextField(20);
    JTextPane textPane;

    public Main() {
        textField.setText("Hit Enter to Add Text to Text Pane");

From source file Main.java

public class Main extends JFrame {
    JComboBox<String> comboBox;
    DefaultListModel<String> model;

    Main() {
        comboBox = new JComboBox<>(new String[] { "111", "222", "333" });

From source file Main.java

public class Main extends JFrame {
    public Main() throws HeadlessException {
        setSize(200, 200);
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        setLayout(new FlowLayout(FlowLayout.LEFT));

From source file Main.java

public class Main extends JFrame {
    DefaultTableModel model = new DefaultTableModel(new Object[][] { { "some", "text" }, { "any", "text" },
            { "even", "more" }, { "text", "strings" }, { "and", "other" }, { "text", "values" } },
            new Object[] { "Column 1", "Column 2" });

    public Main() {

From source file Main.java

public class Main extends JFrame {
    public Main() {
        Object[] items = { Color.red, Color.green, Color.blue };
        JComboBox comboBox = new JComboBox(items);
        comboBox.setRenderer(new ColorRenderer(comboBox));
        getContentPane().add(comboBox, BorderLayout.NORTH);

From source file DefaultCellEditorJTextFieldAlignment.java

public class DefaultCellEditorJTextFieldAlignment extends JFrame {
    DefaultTableModel model = new DefaultTableModel(new Object[][] { { "some", "text" }, { "any", "text" },
            { "even", "more" }, { "text", "strings" }, { "and", "other" }, { "text", "values" } },
            new Object[] { "Column 1", "Column 2" });

    public DefaultCellEditorJTextFieldAlignment() {