Advertisement
iRomain95

LauncherFrame.java

Aug 8th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.41 KB | None | 0 0
  1. package fr.warcubic.launcher.launcher;
  2.  
  3. import javax.swing.JFrame;
  4.  
  5. import com.sun.awt.AWTUtilities;
  6.  
  7. import fr.theshark34.swinger.Swinger;
  8. import fr.theshark34.swinger.animation.Animator;
  9. import fr.theshark34.swinger.util.WindowMover;
  10.  
  11. @SuppressWarnings("serial")
  12. public class LauncherFrame extends JFrame   {
  13.    
  14.     private static LauncherFrame instance;
  15.     public LauncherPanel launcherPanel;
  16.    
  17.     public LauncherFrame()  {
  18.         this.setTitle("GetYourLife Launcher");
  19.         this.setSize(1280, 720);
  20.         this.setDefaultCloseOperation(EXIT_ON_CLOSE);
  21.         this.setLocationRelativeTo(null);
  22.         this.setUndecorated(true);
  23.         this.setIconImage(Swinger.getResource("icon.png"));
  24.         setContentPane(this.launcherPanel = new LauncherPanel());
  25.         AWTUtilities.setWindowOpacity(this, 0.0F);
  26.        
  27.         WindowMover mover = new WindowMover (this);
  28.         this.addMouseListener(mover);
  29.         this.addMouseMotionListener(mover);;
  30.        
  31.         this.setVisible(true);
  32.        
  33.         Animator.fadeInFrame(this, Animator.FAST);
  34.     }
  35.  
  36.     public static void main(String[] args)
  37.             throws Exception
  38.           {
  39.             Swinger.setSystemLookNFeel();
  40.             Swinger.setResourcePath("/fr/warcubic/launcher/launcher/image/");
  41.             launcher.WC_CRASHES_DIR.mkdirs();
  42.            
  43.            
  44.             instance = new LauncherFrame();
  45.           }
  46.    
  47.     public static LauncherFrame getInstance() {
  48.             return instance;
  49.     }  
  50.    
  51.     public LauncherPanel getLauncherPanel () {
  52.         return this.launcherPanel;
  53.     }
  54.  
  55. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement