Advertisement
diablocraft123

LauncherFrame.java

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