Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. import javax.swing.JFrame;
  2. import javax.swing.SwingUtilities;
  3.  
  4.  
  5. public class SlidingPuzzle {
  6.     public static final int WIDTH = 512;
  7.     public static final int HEIGHT = 512;
  8.    
  9.     public static JFrame frame;
  10.    
  11.     public static void main(String[] args) {
  12.         SwingUtilities.invokeLater(new Runnable() {
  13.            
  14.             @Override
  15.             public void run() {
  16.                 frame = new JFrame("Sliding Puzzle");
  17.                 frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
  18.                 frame.setUndecorated(true);
  19.                 frame.setSize(WIDTH, HEIGHT);
  20.                
  21.                 SlidingPuzzlePanel spp = new SlidingPuzzlePanel();
  22.                 frame.add(spp);
  23.                
  24.                 frame.setVisible(true);
  25.             }
  26.         });
  27.     }
  28. }