sample code with JTextField