Java action on a button mmtjohn - Last answer on 28 Jul 2012 1 answer Hello, how can I make another window appear by clicking a button? Thank you Configuration: Windows 7 / Firefox 13.0.1 Show more Related links: Moving a graphic object in Java drawing a graph with java Is it possible to create a game in Java? move a button with the arrow keys in Java Back to Menu Button JAVA Make a checkerboard in Java! 1 answer Sorted by votes Votes Date Descending date Answer 1 / 1 KX Moderator JButton button = new JButton(); button.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { // Opening the new window } }); -- Trust does not exclude control.
Answer 1 / 1 KX Moderator JButton button = new JButton(); button.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { // Opening the new window } }); -- Trust does not exclude control.