Advertisement
Guest User

LauncherFrame

a guest
Jun 25th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.14 KB | None | 0 0
  1. package fr.Neranaton.ReachEscrot;
  2.  
  3. import javax.swing.JFrame;
  4.  
  5. import fr.theshark34.swinger.Swinger;
  6. import fr.theshark34.swinger.util.WindowMover;
  7.  
  8.  
  9.  
  10. @SuppressWarnings("serial")
  11. public class LauncherFrame extends JFrame {
  12.  
  13. private static LauncherFrame instance;
  14. private LauncherPanel launcherPanel;
  15.  
  16. public LauncherFrame() {
  17. this.setTitle("ReachEscrot 1 Launcher");
  18. this.setSize(975, 625);
  19. this.setDefaultCloseOperation(EXIT_ON_CLOSE);
  20. this.setLocationRelativeTo(null);
  21. this.setUndecorated(true);
  22. this.setIconImage(Swinger.getResource("Icon.png"));
  23. this.setContentPane(launcherPanel = new LauncherPanel());
  24.  
  25. WindowMover mover = new WindowMover(this);
  26. this.addMouseListener(mover);
  27. this.addMouseMotionListener(mover);
  28.  
  29.  
  30. this.setVisible(true);
  31. }
  32.  
  33. public static void main(String[] args) {
  34. Swinger.setSystemLookNFeel();
  35. Swinger.setResourcePath("/fr/Neranaton/ReachEscrot/resources/");
  36. instance = new LauncherFrame();
  37. }
  38.  
  39. public static LauncherFrame getInstance() {
  40. return instance;
  41. }
  42.  
  43. public LauncherPanel getLauncherPanel() {
  44. return this.launcherPanel;
  45. }
  46.  
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement