@Override
    public void paint(Graphics g) {
        Dimension currentSize = getSize();
        Dimension maximumSize = getMaximumSize();

        if (currentSize.width > maximumSize.width || currentSize.height > maximumSize.height) {
            currentSize.width = Math.min(maximumSize.width, currentSize.width);
            currentSize.height = Math.min(maximumSize.height, currentSize.height);
            Point p = getLocation();
            p.setLocation(Math.max(p.x, 0),  Math.max(p.y, 0));
            setSize(currentSize);
            setLocation(p);
        }
        super.paint(g);
//        g.drawImage(ImageLoader.getInstance().loadMainFrameOverlay(), 9, 32, null);
	}