how to make a button do something in java code example Example: how to create a button in java JButton button = new JButton();