public void mouseReleased(MouseEvent e)
			{
				if (mode == Mode.DRAW) // in DRAW mode, create the new box
				{					   // and add it to the list of shapes
					int wid = Integer.parseInt(JOptionPane.showInputDialog(
							theWindow,"Enter the width"));
					int ht = Integer.parseInt(JOptionPane.showInputDialog(
							theWindow,"Enter the height"));
					if(rectShape.isSelected())
						newShape = new TextRectangle(x1,y1,wid,ht);
					else if(ellipShape.isSelected())
						newShape = new TextEllipse(x1,y1,wid,ht);
					else if(roundRectShape.isSelected())
						newShape = new TextRoundRect(x1,y1,wid,ht);
					else
						newShape = null;
					if(newShape!=null)
						addShape(newShape);
					drawShape.setEnabled(true);  // Set interface back to
					mode = Mode.NONE;			 // "base" state
					msg.setText("");
				}
				else if (mode == Mode.MOVE) // in MOVE mode, set mode back to
				{							// to NONE and unselect shape (since
					mode = Mode.NONE;		// the move is now finished)
					unSelect();
					selindex = -1;     
					drawShape.setEnabled(true);
					msg.setText("");
					repaint();
				}
				else if (e.isPopupTrigger() && selindex >= 0) // if button is
				{							// the popup menu trigger, show the
					popper.show(ShapePanel.this, x1, y1); // popup menu
				}
			}