public void add(int v) {
			int i;
			this.color = Color.RED;
			repaint();
			paintAll(getGraphics());
			for (i = 1; i <= numOfElements; i++) {
				this.ElementHighlightIdx = i;
				repaint();
				paintAll(getGraphics());
				try {
					Thread.sleep(TIME);
				} catch (InterruptedException e) {
					e.printStackTrace();
				}
				if (value[i] > v)
					break; // iΪvҪλ
			}
			this.ElementHighlightIdx = -1;
			color = Color.BLACK;
			repaint();
			paintAll(getGraphics());
			// viλ
			for (int j = numOfElements; j >= i; j--) {
				// ƶĴ

				value[j + 1] = value[j];
			}
			value[i] = v;

			// Ԫ+1
			numOfElements += 1;

		}