super.paintComponent(g);
	 public void paintComponent(Graphics g)	 {		Graphics2D g2D = (Graphics2D) g;		g2D.setColor(PlaneSlicingPanel.bgColor);		g2D.fillRect(0, 0, WIDTH, HEIGHT);		Font font = g2D.getFont();		FontMetrics fontMetrics = g2D.getFontMetrics();		int hFont = fontMetrics.getHeight();		Rectangle2D rInput = font.getStringBounds("(2) Input", 								g2D.getFontRenderContext());		int wInput = (int) rInput.getWidth();		// grid		AffineTransform transform = new AffineTransform();		// 140/10 = 14 then middle = 14/2		transform.translate(leftBorder+70, topBorder+70); 		transform.scale(1, -1);		transform.scale(10, 10);       		g2D.setPaint(PlaneSlicingPanel.gridColor);		GeneralPath path = new GeneralPath();		for (int i = -7; i <= 7; i++) {			path.moveTo(i, -7);		 	path.lineTo(i, 7);	 	}	 	for (int i = -7; i <= 7; i++) {		 	path.moveTo(-7, i);		 	path.lineTo(7, i);	 	}		g2D.draw(transform.createTransformedShape(path));		g2D.setColor(PlaneSlicingPanel.axisColor);		 		//y-axis		g2D.drawLine(leftBorder, topBorder-8, leftBorder, tS+5);		g2D.drawLine(leftBorder, topBorder-8, leftBorder-3, topBorder-5);		g2D.drawLine(leftBorder, topBorder-8, leftBorder+3, topBorder-5);		g2D.drawLine(leftBorder-5, topBorder, leftBorder, topBorder);		 		// x-axis		g2D.drawLine(leftBorder-5, tS, lS+8, tS);		g2D.drawLine(lS+5, tS-3, lS+8, tS);		g2D.drawLine(lS+5, tS+3, lS+8, tS);		g2D.drawLine(lS, tS, lS, tS+5);		g2D.drawString("(2) Input", leftBorder+square/2-wInput/2, 						tS+bottomBorder/2+hFont);		g2D.drawLine(rStart, yStart, rStart, tS4);		g2D.drawLine(rEnd, yEnd, rEnd, tS4);		 		//set line color		g2D.setColor(PlaneSlicingPanel.lineColor);		g2D.setStroke(new BasicStroke(1.5f));		 		// drawline		g2D.drawLine(leftBorder, tS, rStart, yStart);		g2D.drawLine(rEnd, yEnd, lS, topBorder);		g2D.setColor(PlaneSlicingPanel.fixedLineColor);		g2D.drawLine(rStart+1, tS4, rEnd, tS4);		if (isSelected) {			g2D.setColor(PlaneSlicingPanel.borderColor);			g2D.draw(new Rectangle2D.Double(0, 0, WIDTH, HEIGHT));		} else {			g2D.setColor(PlaneSlicingPanel.layerColor);			g2D.fillRect(0, 0, WIDTH, HEIGHT);		}	}