public void run()
    {
        while (true)
        {
            BufferStrategy strategy = frame.getBufferStrategy();
            Graphics2D g = (Graphics2D)strategy.getDrawGraphics();
            draw(g);
            g.dispose();
            
            strategy.show();
            Toolkit.getDefaultToolkit().sync();
            
            try
            {
                Thread.sleep(20);
            }
            catch (InterruptedException ex)
            {
                ex.printStackTrace();
            }
        }
    }