Tribute to "The Office"

That box almost hits the corner!

Please start with watching the following..

This is the code I have:
package biz.tugay;
 
import javax.swing.*;
import javax.swing.border.BevelBorder;
import java.awt.*;
 
public class TestClass {
 
    private static XDirection currentXDirection = XDirection.RIGHT;
    private static YDirection currentYDirection = YDirection.DOWN;
 
    private static int distance = 2;
 
    public static void main(String[] args) throws InterruptedException {
        final JFrame jFrame = new JFrame();
        jFrame.setSize(800, 800);
        jFrame.getContentPane().setLayout(null);
        jFrame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
 
        final JLabel jLabel = new JLabel();
        jLabel.setLayout(null);
        jLabel.setText("Koray Tugay");
        jLabel.setFont(new Font(Font.SANS_SERIF, Font.BOLD, 32));
        jFrame.add(jLabel);
        jLabel.setLocation(0 , 0);
        jLabel.setSize(200, 50);
        jLabel.setBorder(BorderFactory.createBevelBorder(BevelBorder.RAISED));
        jFrame.setVisible(true);
 
        while (true) {
            Thread.sleep(10);
            int x = (int) jLabel.getLocation().getX();
            int y = (int) jLabel.getLocation().getY();
 
            x = getXDirection(x);
            y = getYDirection(y);
 
            jLabel.setLocation(x, y);
            jFrame.repaint();
        }
    }
 
    private static int getXDirection(int x) {
        if (currentXDirection == XDirection.RIGHT) {
            if (x == 580) {
                currentXDirection = XDirection.LEFT;
                return x - distance;
            } else {
                return x + distance;
            }
        } else if (x == 0) {
            currentXDirection = XDirection.RIGHT;
            return x + distance;
        }
        return x - distance;
    }
 
    private static int getYDirection(int y) {
        if (currentYDirection == YDirection.DOWN) {
            if (y == 700) {
                currentYDirection = YDirection.UP;
                return y - distance;
            } else {
                return y + distance;
            }
        } else if (y == 0) {
            currentYDirection = YDirection.DOWN;
            return y + distance;
        }
        return y - distance;
    }
 
 
    enum XDirection {
        LEFT, RIGHT
    }
 
    enum YDirection {
        UP, DOWN
    }
}

and what I end up with..