public class PanelDemo extends implements Action Listener workbench 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)
}
});