private void drawSelection(Graphics g) {
		if (selX != -1 && selY != -1) { // there is a selection

			// set the color
			if (add == null) {
				g.setColor(new Color(255, 255, 0, 128)); // yellow
			} else if (add) {
				g.setColor(new Color(0, 255, 0, 128)); // green
			} else { // add = false
				g.setColor(new Color(255, 0, 0, 128)); // red
			}

			// draw the selection
			if (selW < 0) {
				int nSelX = selX + selW;
				if (selH < 0) {
					int nSelY = selY + selH;
					g.fillRect(nSelX*SIZE,nSelY*SIZE,(-selW+1)*SIZE,(-selH+1)*SIZE);
				} else {
					g.fillRect(nSelX*SIZE,selY*SIZE,(-selW+1)*SIZE,(selH+1)*SIZE);
				}
			} else if (selH < 0) { // selX cannot be < 0
				int nSelY = selY + selH;
				g.fillRect(selX*SIZE,nSelY*SIZE,(selW+1)*SIZE,(-selH+1)*SIZE);
			} else {
				g.fillRect(selX*SIZE,selY*SIZE,(selW+1)*SIZE,(selH+1)*SIZE);
			}
		}
	}