private void moveDown() {

        if(imagePanel.getOrientation() == 0) {
            if(imagePanel.getImageHeight() > imagePanel.getFrameHeight()) {
                if(Math.abs(imagePanel.getYPos() - 3) < imagePanel.getImageHeight()
                        - imagePanel.getFrameHeight() && imagePanel.getYPos() - 3 <= 0) {
                    imagePanel.setY(imagePanel.getYPos() - 3);
                    imagePanel.repaint();
                }
            }
        }
        else if(imagePanel.getOrientation() == 1) {

            if(imagePanel.getImageHeight() > imagePanel.getFrameHeight()) {

                if(Math.abs(imagePanel.getXPos() - 3) < imagePanel.getImageHeight()
                        - imagePanel.getFrameHeight()
                            && imagePanel.getXPos() - 3 <= 0) {
                    imagePanel.setX(imagePanel.getXPos() - 3);
                    imagePanel.repaint();
                }
            }
        }
    }