Как я могу сделать несколько событий на кнопке?Два события на кнопке
public JButton getNumero1() {
numero1Button = new JButton();
numero1Button.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ic_images/bt_n1.png")));
ActionListener monitorador = new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
entradaNumero1.setText(("1"));
entradaNumero1.setEnabled(false);
entradaNumero2.setText(("2"));
entradaNumero2.setEnabled(false);
}
};
numero1Button.addActionListener(monitorador);
return numero1Button;
}
Я хочу, чтобы первый был JTextField, а затем еще один!
Спасибо!
Суреш Койя! Спасибо, мужик! Вопрос был решен! –