if (newFrame != null) {
if ( newFrame != null && newFrame != this.currentlyActiveContainer ) {
	protected boolean handleKeyPressed(int keyCode, int gameAction) {		boolean handled = this.currentlyActiveContainer.handleKeyPressed(keyCode, gameAction);		if (! handled ) {			Container newFrame = null;			if (this.currentlyActiveContainer == this.container ) {				Container[] nextFrames;				switch (gameAction) {					case DOWN:						nextFrames = new Container[]{ this.bottomFrame, this.leftFrame, this.rightFrame, this.topFrame };						break;					case UP:						nextFrames = new Container[]{ this.topFrame, this.leftFrame, this.rightFrame, this.bottomFrame };						break;					case LEFT:						nextFrames = new Container[]{ this.leftFrame, this.topFrame, this.bottomFrame, this.rightFrame };						break;					default:						nextFrames = new Container[]{ this.rightFrame, this.topFrame, this.bottomFrame, this.leftFrame };				}				for (int i = 0; i < nextFrames.length; i++) {					Container frame = nextFrames[i];					if (frame != null && frame.appearanceMode != Item.PLAIN) {						newFrame = frame;						break;					}				}			} else {				//System.out.println("Changing back to default container");				newFrame = this.container;			}			if (newFrame != null) {				setActiveFrame(newFrame);				handled = true;			}		//} else {		//	System.out.println("currently active container has handled the key press event");		}		return handled;	}