SHARE
TWEET

LauncherFrame

a guest Jan 22nd, 2020 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package fr.midacoyt.valerium.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.     private static LauncherFrame instance;
  11.     private LauncherPanel launcherPanel;
  12.    
  13.     public LauncherFrame() {
  14.         this.setTitle("Valerium Launcher");
  15.         this.setSize(975, 625);
  16.         this.setDefaultCloseOperation(EXIT_ON_CLOSE);
  17.         this.setLocationRelativeTo(null);
  18.         this.setUndecorated(true);
  19.         this.setIconImage(Swinger.getResource("icon.png"));
  20.         this.setContentPane(launcherPanel = new LauncherPanel());
  21.        
  22.         WindowMover mover = new WindowMover(this);
  23.         this.addMouseListener(mover);
  24.         this.addMouseMotionListener(mover);
  25.        
  26.        
  27.         this.setVisible(true);
  28.     }
  29.    
  30.     public static void main(String[] args)
  31.     {
  32.         Swinger.setSystemLookNFeel();
  33.         Swinger.setResourcePath("/fr/midacoyt/valerium/launcher/resources");
  34.        
  35.         instance = new LauncherFrame();
  36.     }
  37.    
  38.     public static LauncherFrame getInstance() {
  39.         return instance;
  40.     }
  41.    
  42.     public LauncherPanel getLauncherPanel() {
  43.         return this.launcherPanel;
  44.     }
  45. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top