@Override
    public void update() {
        if (Mouse.getX() > getX() && Mouse.getX() < getX() + getWidth()) {
            int mousey = Display.getHeight() - Mouse.getY();
            if (mousey > getY() && mousey < getY() + getHeight()) {
                if (Mouse.isButtonDown(0)) {
                    if (!held) {
                        if (state == State.Checked) {
                            state = State.Unchecked;
                            setChanged();
                            notifyObservers(state);
                        } else {
                            state = State.Checked;
                            setChanged();
                            notifyObservers(state);
                        }

                        held = true;
                    }
                } else {
                    held = false;
                }
            }
        }
    }