I\'m learning Swing class now and everything about it. I\'ve got this toy program I\'ve been putting together that prompts for a name and then presents a JOptionPane with th
textField_in = new JTextField();
textField_in.addKeyListener(new KeyAdapter() {
@Override
public void keyPressed(KeyEvent arg0) {
System.out.println(arg0.getExtendedKeyCode());
if (arg0.getKeyCode()==10) {
String name = textField_in.getText();
textField_out.setText(name);
}
}
});
textField_in.setBounds(173, 40, 86, 20);
frame.getContentPane().add(textField_in);
textField_in.setColumns(10);