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