} catch (RuntimeException e) {  g.setColor( 0xFF0000 ); g.fillRect( 0, 0, this.screenWidth, this.screenHeight ); g.setColor( 0 ); String msg = e.toString(); g.drawString( msg, 10, 10, Graphics.TOP | Graphics.LEFT ); Debug.debug( "unable to paint screen: " + e.toString(), e );  throw e; }
	protected void paint(Graphics g) {		// paint background:		if (this.background != null) {			//#ifdef tmp.menuFullScreen			this.background.paint(0, 0, this.screenWidth, this.fullScreenHeight, g);			//#else			this.background.paint(0, 0, this.screenWidth, this.screenHeight, g);			//#endif		}		// paint title:		if (this.title != null) {			this.title.paint(0, 0, 0, this.screenWidth, g);		}				int y = this.titleHeight;		// protect the title and the full-screen-menu area:		g.setClip(0, y, this.screenWidth, this.screenHeight - y );		// paint content:		g.translate( 0, y );		paintScreen( g);		g.translate( 0, -y );		// allow painting outside of the screen again:		//#ifdef tmp.menuFullScreen		g.setClip(0, 0, this.screenWidth, this.fullScreenHeight );		//#else		g.setClip(0, 0, this.screenWidth, this.screenHeight );		//#endif				// paint border:		if (this.border != null) {			this.border.paint(0, 0, this.screenWidth, this.screenHeight, g);		}				// paint menu in full-screen mode:		//#ifdef tmp.menuFullScreen			if (this.menuOpened) {				int menuHeight = this.menuContainer.getItemHeight(this.menuMaxWidth, this.menuMaxWidth);				y = this.screenHeight - menuHeight;				if (y < this.titleHeight) {					y = this.titleHeight; 					this.menuContainer.setVerticalDimensions(y, this.screenHeight);				}				this.menuContainer.paint(0, y, 0, this.menuMaxWidth, g);			} 			// clear menu-bar:			if (this.menuBarColor != Item.TRANSPARENT) {				g.setColor( this.menuBarColor );				g.fillRect(0, this.screenHeight, this.screenWidth,  this.menuBarHeight );			}			if (this.menuContainer.size() > 0) {				String menuText = null;				if (this.menuOpened) {					//TODO rob internationalise cmd.selectMenu					menuText = "Select";				} else {					if (this.menuSingleCommand != null) {						menuText = this.menuSingleCommand.getLabel();					} else {						//TODO rob internationalise cmd.openMenu						menuText = "Options";									}				}				g.setColor( this.menuFontColor );				g.setFont( this.menuFont );				g.drawString(menuText, 2, this.screenHeight + 1, Graphics.TOP | Graphics.LEFT );				if ( this.menuOpened ) {					// draw select string:					//TODO rob internationalise cmd.cancelMenu					menuText = "Cancel";					g.drawString(menuText, this.screenWidth - 2, this.screenHeight + 1, Graphics.TOP | Graphics.RIGHT );				}			}		//#endif		//TODO rob paint the ticker	}