Advertisement
Guest User

LauncherFrame

a guest
Sep 25th, 2016
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package fr.mrromdj.FTG.launcher;
  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 LauncherPanel launcherPanel;
  13.    
  14.     public LauncherFrame() {
  15.         this.setTitle("Feed The Galaxy 1 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("icon.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[] arg) {
  31.         Swinger.setSystemLookNFeel();
  32.         Swinger.setResourcePath("/fr/mrromdj/FTG/launcher/ressources/");
  33.        
  34.         instance = new LauncherFrame();
  35.     }
  36.        
  37.     public static LauncherFrame getInstance() {
  38.         return instance;
  39.     }
  40.    
  41.     public LauncherPanel getLauncherPanel() {
  42.         return this.launcherPanel;
  43.     }
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement