blob: 4f5a623ea6e83866829a863eb65dd884b615b199 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
import javax.swing.JFrame;
import javax.swing.JTextField;
public class TypeInSwing {
public static void main(String[] args) {
JFrame frame = new JFrame("HelloWorldSwing");
final JTextField field = new JTextField("type here");
frame.getContentPane().add(field);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.pack();
frame.setVisible(true);
}
}
|