Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import javax.swing.JTextField;
import javax.swing.SwingUtilities;

public class Main {
    public static void main(String[] argv) throws Exception {
        final JTextField textfield = new JTextField(10);

        SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                textfield.requestFocus();
            }
        });

    }
}