Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public RPSwindow() {
- initComponents();
- Action action = new Action("New Game");// set both new game buttons
- newgamebutton.setAction(action);
- newgameitem.setAction(action);
- }
- public class Action extends AbstractAction{
- Action(String name ) {
- super(name); // sets the name of the menu item/button/etc
- }
- // concets the new game buttons
- @Override
- public void actionPerformed(ActionEvent ae) {
- setup();// metod anrop som skall ske när man trycker på New Game
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement