public void setSelected(String tool, boolean yn) {
		int N = this.getComponentCount();
		int i = 0;
		for (i = 0; i < N
				&& !this.getComponent(i).getClass().equals(JButton.class); i++)
			;
		if (i < N) {
			Object o = this.getComponent(i);
			JButton b = (JButton) o;
			while (i < N && !b.getActionCommand().equals(tool)) {
				i += 1;
				if (i < N) {
					o = this.getComponent(i);
					if (o.getClass().equals(JButton.class)) {
						b = (JButton) o;
					}
				}
			}

			if (i < N) {
				JXMLNoteIcon icon = (JXMLNoteIcon) b.getIcon();
				icon.setSelected(yn);
				b.updateUI();
			}
		}
	}