action on boutton click java swing

63

action on boutton click java swing -

JButton b = new JButton("push me");
b.addActionListener(new ActionListener() {

    @Override
    public void actionPerformed(ActionEvent e) {
        //your actions
    }
});

Comments

Submit
0 Comments