newState = new JState(getComponentCountInLayer(STATE_LAYER), this);
    public JState addState(Point position) {        JState newState;                newState = new JState(getComponentCountInLayer(STATE_LAYER), this);        newState.setBounds(position.x, position.y, STATE_SIZE, STATE_SIZE);                add(newState);        setLayer(newState, STATE_LAYER);        return newState;    }