Advertisement
Guest User

LaucnherFrame.java

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