public void update(Graphics g) {
		if (paintLoadingMessage) {
			Color bg = viewer.getColorBackground();
			g.setColor(bg);
			g.fillRect(0, 0, getWidth(), getHeight());
			g.setColor(contrastBackground());
			g.setFont(FONT_BOLD_18);
			FontMetrics fm = g.getFontMetrics();
			String s = MolecularContainer.getInternationalText("PleaseWait");
			if (s == null)
				s = "Loading data, please wait...";
			g.drawString(s, (getWidth() - fm.stringWidth(s)) >> 1, (getHeight() - fm.getHeight()) >> 1);
			g.setFont(FONT_BOLD_15);
			fm = g.getFontMetrics();
			s = "3D Simulator, Molecular Workbench";
			g.drawString(s, (getWidth() - fm.stringWidth(s)) >> 1, (getHeight() >> 1) + fm.getHeight());
			return;
		}
		synchronized (updateLock) {
			viewer.setScreenDimension(getSize(currentSize));
			g.getClipBounds(rectClip);
			viewer.renderScreenImage(g, currentSize, rectClip);
			if (showEnergizer && energizer != null)
				energizer.paint(g);
			if (showClock)
				clock.paint(g);
			if (model.heatBathActivated()) {
				IconPool.getIcon("heat bath").paintIcon(this, g, 8, 8);
			}
			if (!model.isRunning()) {
				if (actionID == SLRT_ID || actionID == DELR_ID || actionID == FIXR_ID || actionID == XIFR_ID
						|| actionID == TSLC_ID || actionID == CLST_ID || actionID == HIDE_ID || actionID == EDIH_ID) {
					g.setColor(contrastBackground());
					g.drawRect(selectedArea.x, selectedArea.y, selectedArea.width, selectedArea.height);
				}
				else if (actionID == SLOV_ID || actionID == DELC_ID || actionID == FIXC_ID || actionID == XIFC_ID) {
					g.setColor(contrastBackground());
					g.drawOval(selectedArea.x, selectedArea.y, selectedArea.width, selectedArea.height);
				}
				else if (isAddingAtomMode() || isAddingObstacleMode() || isAddingMoleculeMode()) {
					paintDropPlaneInfo(g);
				}
			}
			paintInfoString(g);
			if (viewer.getNavigationMode()) {
				navigator.paint(g);
				cockpit.paint(g);
			}
			super.update(g);
		}
	}