daily pastebin goal
68%
SHARE
TWEET

Untitled

a guest May 16th, 2018 97 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. private JMenuBar menuBar;
  2. private JMenu file, cheats, music, aboutmenu;
  3. private JMenuItem help, about, credits, exit, noclip, play, pause, next, previous;
  4. private JCheckBox fullscreen, hpheads;
  5. private static String newline = "\n";
  6.  
  7. JMenuBar menuBar = new JMenuBar();
  8. JMenu file = new JMenu("File");
  9. JMenu aboutmenu = new JMenu("About");
  10. JMenu cheats = new JMenu("Cheats");
  11. JMenu music = new JMenu("Music");
  12.  
  13. JMenuItem help = new JMenuItem("Help");
  14. help.addActionListener(this);
  15. JMenuItem about = new JMenuItem("About");
  16. about.addActionListener(this);
  17. JMenuItem credits = new JMenuItem("Credits");
  18. credits.addActionListener(this);
  19. JMenuItem exit = new JMenuItem("Exit");
  20. exit.addActionListener(this);
  21. JMenuItem noclip = new JMenuItem("Noclip");
  22. noclip.addActionListener(this);
  23. JMenuItem play = new JMenuItem("Play");
  24. play.addActionListener(this);
  25. JMenuItem pause = new JMenuItem("Pause");
  26. pause.addActionListener(this);
  27. JMenuItem next = new JMenuItem("Next");
  28. next.addActionListener(this);
  29. JMenuItem previous = new JMenuItem("Previous");
  30. previous.addActionListener(this);
  31.  
  32. JCheckBox fullscreen = new JCheckBox("Full Screen");
  33. fullscreen.addActionListener(this);
  34. JCheckBox hpheads = new JCheckBox("Hp Heads On");
  35. hpheads.addActionListener(this);
  36.  
  37. client1.setJMenuBar(menuBar);
  38. client1.add(menuBar);
  39. menuBar.add(file);
  40. file.add(exit);
  41. menuBar.add(aboutmenu);
  42. aboutmenu.add(about);
  43. aboutmenu.add(credits);
  44. aboutmenu.addSeparator();
  45. aboutmenu.add(help);
  46. menuBar.add(cheats);
  47. cheats.add(noclip);
  48. menuBar.add(music);
  49. music.add(play);
  50. music.add(pause);
  51. music.add(next);
  52. music.add(previous);
  53. menuBar.add(fullscreen);
  54. menuBar.add(hpheads);
  55.  
  56.  
  57.     public void actionPerformed(ActionEvent event) {
  58.                     Object source = event.getSource();
  59.    
  60.         if(source == help) {
  61.            JOptionPane.showMessageDialog(null, "Need help? PM TeleNubby or Tico135\n", "on the forums.");
  62.         }
  63.         if(source == about) {
  64.            JOptionPane.showMessageDialog(null, "Project Revolution was made by\n","TeleNubby & Tico135.");
  65.         }
  66.         if(source == credits) {
  67.            JOptionPane.showMessageDialog(null, "TeleNubby and Tico135");
  68.         }
  69.         if(source == exit) {
  70.            System.exit(0);
  71.         }
  72.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top