Java action on a button

mmtjohn Posted messages 1 Status Membre -  
KX Posted messages 19031 Status Modérateur -
Hello,

how can I make another window appear by clicking a button? Thank you

Configuration: Windows 7 / Firefox 13.0.1

1 réponse

KX Posted messages 19031 Status Modérateur 3 020
 


JButton button = new JButton(); button.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { // Opening the new window } });

--
Trust does not exclude control.
1