super.paintComponent(g);
	public void paintComponent(Graphics g)	{		Graphics2D g2D = (Graphics2D) g;		g2D.setColor(bgColor);		g2D.fillRect(0, 0, WIDTH, HEIGHT);		Font font = g2D.getFont();		FontMetrics fontMetrics = g2D.getFontMetrics();		int hFont = fontMetrics.getHeight();		Rectangle2D rInput = font.getStringBounds("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(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(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);				//input knob start		int xStartPoints[] = {xStart1, xStart2, xStart3};		int yStartPoints[] = {yStart1, yStart2, yStart3};		GeneralPath filledPolygonStart = new GeneralPath();		filledPolygonStart.moveTo(xStartPoints[0], yStartPoints[0]);		for (int index = 1; index < xStartPoints.length; index++)			filledPolygonStart.lineTo(xStartPoints[index], yStartPoints[index]);		filledPolygonStart.closePath();		g2D.setColor(startColor);		g2D.fill(filledPolygonStart);				//input knob end 		int xEndPoints[] = {xEnd1, xEnd2, xEnd3};		int yEndPoints[] = {yEnd1, yEnd2, yEnd3};		GeneralPath filledPolygonEnd = new GeneralPath();		filledPolygonEnd.moveTo(xEndPoints[0], yEndPoints[0]);		for (int index = 1; index < xEndPoints.length; index++)			filledPolygonEnd.lineTo(xEndPoints[index], yEndPoints[index]);		filledPolygonEnd.closePath();		g2D.setColor(endColor);		g2D.fill(filledPolygonEnd);				// output knob start 		int xStartOutputPoints[] = {xStartOutput1, xStartOutput2, 									xStartOutput3};		int yStartOutputPoints[] = {yStartOutput1, yStartOutput2, 									yStartOutput3};		GeneralPath filledPolygonStartOutput = new GeneralPath();		filledPolygonStartOutput.moveTo(xStartOutputPoints[0], 										yStartOutputPoints[0]);		for (int index = 1; index < xStartOutputPoints.length; index++)			filledPolygonStartOutput.lineTo(xStartOutputPoints[index],											 yStartOutputPoints[index]);		filledPolygonStartOutput.closePath();		g2D.setColor(startColor);		g2D.fill(filledPolygonStartOutput);		//output knob end		int xEndOutputPoints[] = {xEndOutput1, xEndOutput2, xEndOutput3};		int yEndOutputPoints[] = {yEndOutput1, yEndOutput2, yEndOutput3};		GeneralPath filledPolygonEndOutput = new GeneralPath();		filledPolygonEndOutput.moveTo(xEndOutputPoints[0], yEndOutputPoints[0]);		for (int index = 1; index < xEndOutputPoints.length; index++)			filledPolygonEndOutput.lineTo(xEndOutputPoints[index], 										yEndOutputPoints[index]);		filledPolygonEndOutput.closePath();		g2D.setColor(endColor);		g2D.fill(filledPolygonEndOutput);				g2D.drawString("Input", lS2-wInput/2, tS+bottomBorder/2+hFont);		// set line color		g2D.setColor(lineColor);		g2D.setStroke(new BasicStroke(1.5f));		// draw line		g2D.drawLine((int) staticStartPt.getX(), (int) staticStartPt.getY(),					(int) startPt.getX(), (int) startPt.getY());		g2D.drawLine((int) endPt.getX(), (int) endPt.getY(), 					(int) staticEndPt.getX(), (int) staticEndPt.getY());		g2D.drawLine((int) startPt.getX(), (int) startPt.getY(), 					(int) endPt.getX(), (int) endPt.getY()); 	}