Java action on a button

mmtjohn Posted messages 1 Status Member -  
KX Posted messages 19031 Status Moderator -
Hello,

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

Configuration: Windows 7 / Firefox 13.0.1

1 answer

  1. KX Posted messages 19031 Status Moderator 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