java swing button action listener code example
Example: actionlistener java
JButton Button = new JButton();
Button.setSize(300,300);
Button.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e)
System.out.println(BlockNumber)
}
});