Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import javax.swing.JFrame;
import javax.swing.JTextField;
import javax.swing.text.AbstractDocument;

public class Main {
    public static void main(String[] args) {
        JFrame f = new JFrame("Text Field Elements");
        JTextField tf = new JTextField(32);
        tf.setText("That's one small step for man...");
        f.getContentPane().add(tf);
        f.pack();
        f.setVisible(true);

        ((AbstractDocument) tf.getDocument()).dump(System.out);
    }
}