public static void showDialog(final Object obj) {
		if (obj == null)
			return;
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				if (obj instanceof Atom) {
					createDialog((Atom) obj).setVisible(true);
				}
				else if (obj instanceof RBond) {
					createDialog((RBond) obj).setVisible(true);
				}
				else if (obj instanceof ABond) {
					createDialog((ABond) obj).setVisible(true);
				}
				else if (obj instanceof TBond) {
					createDialog((TBond) obj).setVisible(true);
				}
				else if (obj instanceof Molecule) {
					createDialog((Molecule) obj).setVisible(true);
				}
				else if (obj instanceof Obstacle) {
					createDialog((Obstacle) obj).setVisible(true);
				}
			}
		});
	}