/* Author: Amay Agrawal
 * Project: Bacteria Cloud
 * Mentor: Prof. Manish K Gupta
 */
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.RenderingHints;
import java.awt.geom.Ellipse2D;
import java.awt.geom.Rectangle2D;

import javax.swing.JFrame;
import javax.swing.JPanel;

import java.awt.Color;
import java.awt.Container;
import java.awt.Font;
import java.awt.event.*;

public class Gel extends JFrame 
{
	int arr[] = {24,29,187,229,233,375,410,566,626,651,716,832,939,974,1359,1369,1425,1426,1446,1581,1664,1672,2002,2066,2117,2220,2227,2246,2296,2357,2473,2889,3366,3538,3611,3736,3846,4170,4286}; 
    String arr1[] = {"ClaI","HindIII","EcoRV","NheI","BmtI","BamHI","SgrAI","SphI","EcoNI","SalI","PshAI","BpmI","EagI","NruI",
    		          "BsmI","StyI","BsoBI","BmeT110I","MscI","Bpu10I","BspEI","BsaBI","BpmI","PvuII","PfoI","PflFI","BsaAI","BstZ17I","NdeI","BspQI","AflIII","AlwNI","AhdI","AseI","PstI","PvuI","ScaI","SspI","ZraI"};
	int length = arr.length;
	int count=0;
	int counter=0;
	static int length1 = 0;
	static int ghj= 0;
	static String plasmidname;
	static String plasmidname1;
	static String plasmidsub;
	static String plasmidsub1;
	static String plasmidsub2;
	static String plasmidsub3;
	
	public Gel(int ab){
		length1 = ab;
	}
	
	public Gel(String a,String b,String c,String d,String e,String f){
		plasmidname = a;
		plasmidname1 = b;
		plasmidsub = c;
		plasmidsub1 = d;
		plasmidsub2 = e;
		plasmidsub3 = f;
	}
	
	public void Gel1()
	{
		 this.getContentPane().setBackground(Color.black);
		setTitle("Gel Electrophoresis");
		setSize(1200,1200);
		setVisible(true);
		setDefaultCloseOperation(EXIT_ON_CLOSE);
		
	}
	

	@Override
	public void paint(Graphics gg)
	{
        for(int jk=0;jk<10;jk++)
        super.paint(gg);
       
		Graphics2D g = (Graphics2D) gg;
		
	/* Enable anti-aliasing and pure stroke */
	//g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
	//g.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_PURE);
		int i=0;
	for(i=0;i<500;i++){
		

			//g.setBackground(Color.YELLOW);
			g.setColor(Color.white);
			
			Rectangle2D.Double shape1 = new Rectangle2D.Double(400+i, 200, 5, 5);
			/* Construct a shape and draw it */
			Ellipse2D.Double shape = new Ellipse2D.Double(400+i, 200, 5, 5);
			g.draw(shape1);
			g.fill(shape1);
			//g.drawString(check1,600+ a, 400+b);
			this.validate();
//		}

	}
	
	for(i=0;i<50;i++){
		

		//g.setBackground(Color.YELLOW);
		g.setColor(Color.gray);
		
		Rectangle2D.Double shape1 = new Rectangle2D.Double(420+i, 215, 0.5, 0.5);
		/* Construct a shape and draw it */
		Ellipse2D.Double shape = new Ellipse2D.Double(420+i, 215, 0.5, 0.5);
		g.draw(shape1);
		g.fill(shape1);
		//g.drawString(check1,600+ a, 400+b);
		this.validate();
//	}

}
	
	for(i=0;i<20;i++){
		

		//g.setBackground(Color.YELLOW);
		g.setColor(Color.gray);
		
		Rectangle2D.Double shape1 = new Rectangle2D.Double(420, 215+i, 0.5, 0.5);
		/* Construct a shape and draw it */
		Ellipse2D.Double shape = new Ellipse2D.Double(420, 215+i, 0.5, 0.5);
		g.draw(shape1);
		g.fill(shape1);
		//g.drawString(check1,600+ a, 400+b);
		this.validate();
//	}

}
	
	for(i=0;i<20;i++){
		

		//g.setBackground(Color.YELLOW);
		g.setColor(Color.gray);
		
		Rectangle2D.Double shape1 = new Rectangle2D.Double(469, 215+i, 0.5, 0.5);
		/* Construct a shape and draw it */
		Ellipse2D.Double shape = new Ellipse2D.Double(469, 215+i, 0.5, 0.5);
		g.draw(shape1);
		g.fill(shape1);
		//g.drawString(check1,600+ a, 400+b);
		this.validate();
//	}

}
	
	for(i=0;i<50;i++){
		

		//g.setBackground(Color.YELLOW);
		g.setColor(Color.gray);
		
		Rectangle2D.Double shape1 = new Rectangle2D.Double(420+i, 235, 0.5, 0.5);
		/* Construct a shape and draw it */
		Ellipse2D.Double shape = new Ellipse2D.Double(420+i, 235, 0.5, 0.5);
		g.draw(shape1);
		g.fill(shape1);
		//g.drawString(check1,600+ a, 400+b);
		this.validate();
//	}

}

	
for(i=0;i<50;i++){
		

		//g.setBackground(Color.YELLOW);
		g.setColor(Color.gray);
		
		Rectangle2D.Double shape1 = new Rectangle2D.Double(499+i, 215, 0.5, 0.5);
		/* Construct a shape and draw it */
		Ellipse2D.Double shape = new Ellipse2D.Double(499+i, 215, 0.5, 0.5);
		g.draw(shape1);
		g.fill(shape1);
		//g.drawString(check1,600+ a, 400+b);
		this.validate();
//	}

}
	
	for(i=0;i<20;i++){
		

		//g.setBackground(Color.YELLOW);
		g.setColor(Color.gray);
		
		Rectangle2D.Double shape1 = new Rectangle2D.Double(499, 215+i, 0.5, 0.5);
		/* Construct a shape and draw it */
		Ellipse2D.Double shape = new Ellipse2D.Double(499, 215+i, 0.5, 0.5);
		g.draw(shape1);
		g.fill(shape1);
		//g.drawString(check1,600+ a, 400+b);
		this.validate();
//	}

}
	
	for(i=0;i<20;i++){
		

		//g.setBackground(Color.YELLOW);
		g.setColor(Color.gray);
		
		Rectangle2D.Double shape1 = new Rectangle2D.Double(549, 215+i, 0.5, 0.5);
		/* Construct a shape and draw it */
		Ellipse2D.Double shape = new Ellipse2D.Double(549, 215+i, 0.5, 0.5);
		g.draw(shape1);
		g.fill(shape1);
		//g.drawString(check1,600+ a, 400+b);
		this.validate();
//	}

}
	
	for(i=0;i<50;i++){
		

		//g.setBackground(Color.YELLOW);
		g.setColor(Color.gray);
		
		Rectangle2D.Double shape1 = new Rectangle2D.Double(499+i, 235, 0.5, 0.5);
		/* Construct a shape and draw it */
		Ellipse2D.Double shape = new Ellipse2D.Double(499+i, 235, 0.5, 0.5);
		g.draw(shape1);
		g.fill(shape1);
		//g.drawString(check1,600+ a, 400+b);
		this.validate();
//	}

}
	
for(i=0;i<50;i++){
		

		//g.setBackground(Color.YELLOW);
		g.setColor(Color.gray);
		
		Rectangle2D.Double shape1 = new Rectangle2D.Double(579+i, 215, 0.5, 0.5);
		/* Construct a shape and draw it */
		Ellipse2D.Double shape = new Ellipse2D.Double(579+i, 215, 0.5, 0.5);
		g.draw(shape1);
		g.fill(shape1);
		//g.drawString(check1,600+ a, 400+b);
		this.validate();
//	}

}
	
	for(i=0;i<20;i++){
		

		//g.setBackground(Color.YELLOW);
		g.setColor(Color.gray);
		
		Rectangle2D.Double shape1 = new Rectangle2D.Double(579, 215+i, 0.5, 0.5);
		/* Construct a shape and draw it */
		Ellipse2D.Double shape = new Ellipse2D.Double(579, 215+i, 0.5, 0.5);
		g.draw(shape1);
		g.fill(shape1);
		//g.drawString(check1,600+ a, 400+b);
		this.validate();
//	}

}
	
	for(i=0;i<20;i++){
		

		//g.setBackground(Color.YELLOW);
		g.setColor(Color.gray);
		
		Rectangle2D.Double shape1 = new Rectangle2D.Double(629, 215+i, 0.5, 0.5);
		/* Construct a shape and draw it */
		Ellipse2D.Double shape = new Ellipse2D.Double(629, 215+i, 0.5, 0.5);
		g.draw(shape1);
		g.fill(shape1);
		//g.drawString(check1,600+ a, 400+b);
		this.validate();
//	}

}
	
	for(i=0;i<50;i++){
		

		//g.setBackground(Color.YELLOW);
		g.setColor(Color.gray);
		
		Rectangle2D.Double shape1 = new Rectangle2D.Double(579+i, 235, 0.5, 0.5);
		/* Construct a shape and draw it */
		Ellipse2D.Double shape = new Ellipse2D.Double(579+i, 235, 0.5, 0.5);
		g.draw(shape1);
		g.fill(shape1);
		//g.drawString(check1,600+ a, 400+b);
		this.validate();
//	}

}
	
for(i=0;i<50;i++){
		

		//g.setBackground(Color.YELLOW);
		g.setColor(Color.gray);
		
		Rectangle2D.Double shape1 = new Rectangle2D.Double(659+i, 215, 0.5, 0.5);
		/* Construct a shape and draw it */
		Ellipse2D.Double shape = new Ellipse2D.Double(659+i, 215, 0.5, 0.5);
		g.draw(shape1);
		g.fill(shape1);
		//g.drawString(check1,600+ a, 400+b);
		this.validate();
//	}

}
	
	for(i=0;i<20;i++){
		

		//g.setBackground(Color.YELLOW);
		g.setColor(Color.gray);
		
		Rectangle2D.Double shape1 = new Rectangle2D.Double(659, 215+i, 0.5, 0.5);
		/* Construct a shape and draw it */
		Ellipse2D.Double shape = new Ellipse2D.Double(659, 215+i, 0.5, 0.5);
		g.draw(shape1);
		g.fill(shape1);
		//g.drawString(check1,600+ a, 400+b);
		this.validate();
//	}

}
	
	for(i=0;i<20;i++){
		

		//g.setBackground(Color.YELLOW);
		g.setColor(Color.gray);
		
		Rectangle2D.Double shape1 = new Rectangle2D.Double(709, 215+i, 0.5, 0.5);
		/* Construct a shape and draw it */
		Ellipse2D.Double shape = new Ellipse2D.Double(709, 215+i, 0.5, 0.5);
		g.draw(shape1);
		g.fill(shape1);
		//g.drawString(check1,600+ a, 400+b);
		this.validate();
//	}

}
	
	for(i=0;i<50;i++){
		

		//g.setBackground(Color.YELLOW);
		g.setColor(Color.gray);
		
		Rectangle2D.Double shape1 = new Rectangle2D.Double(659+i, 235, 0.5, 0.5);
		/* Construct a shape and draw it */
		Ellipse2D.Double shape = new Ellipse2D.Double(659+i, 235, 0.5, 0.5);
		g.draw(shape1);
		g.fill(shape1);
		//g.drawString(check1,600+ a, 400+b);
		this.validate();
//	}

}
	
for(i=0;i<50;i++){
		

		//g.setBackground(Color.YELLOW);
		g.setColor(Color.gray);
		
		Rectangle2D.Double shape1 = new Rectangle2D.Double(739+i, 215, 0.5, 0.5);
		/* Construct a shape and draw it */
		Ellipse2D.Double shape = new Ellipse2D.Double(739+i, 215, 0.5, 0.5);
		g.draw(shape1);
		g.fill(shape1);
		//g.drawString(check1,600+ a, 400+b);
		this.validate();
//	}

}
	
	for(i=0;i<20;i++){
		

		//g.setBackground(Color.YELLOW);
		g.setColor(Color.gray);
		
		Rectangle2D.Double shape1 = new Rectangle2D.Double(739, 215+i, 0.5, 0.5);
		/* Construct a shape and draw it */
		Ellipse2D.Double shape = new Ellipse2D.Double(739, 215+i, 0.5, 0.5);
		g.draw(shape1);
		g.fill(shape1);
		//g.drawString(check1,600+ a, 400+b);
		this.validate();
//	}

}
	
	for(i=0;i<20;i++){
		

		//g.setBackground(Color.YELLOW);
		g.setColor(Color.gray);
		
		Rectangle2D.Double shape1 = new Rectangle2D.Double(789, 215+i, 0.5, 0.5);
		/* Construct a shape and draw it */
		Ellipse2D.Double shape = new Ellipse2D.Double(789, 215+i, 0.5, 0.5);
		g.draw(shape1);
		g.fill(shape1);
		//g.drawString(check1,600+ a, 400+b);
		this.validate();
//	}

}
	
	for(i=0;i<50;i++){
		

		//g.setBackground(Color.YELLOW);
		g.setColor(Color.gray);
		
		Rectangle2D.Double shape1 = new Rectangle2D.Double(739+i, 235, 0.5, 0.5);
		/* Construct a shape and draw it */
		Ellipse2D.Double shape = new Ellipse2D.Double(739+i, 235, 0.5, 0.5);
		g.draw(shape1);
		g.fill(shape1);
		//g.drawString(check1,600+ a, 400+b);
		this.validate();
//	}

}
	
for(i=0;i<50;i++){
		

		//g.setBackground(Color.YELLOW);
		g.setColor(Color.gray);
		
		Rectangle2D.Double shape1 = new Rectangle2D.Double(819+i, 215, 0.5, 0.5);
		/* Construct a shape and draw it */
		Ellipse2D.Double shape = new Ellipse2D.Double(819+i, 215, 0.5, 0.5);
		g.draw(shape1);
		g.fill(shape1);
		//g.drawString(check1,600+ a, 400+b);
		this.validate();
//	}

}
	
	for(i=0;i<20;i++){
		

		//g.setBackground(Color.YELLOW);
		g.setColor(Color.gray);
		
		Rectangle2D.Double shape1 = new Rectangle2D.Double(819, 215+i, 0.5, 0.5);
		/* Construct a shape and draw it */
		Ellipse2D.Double shape = new Ellipse2D.Double(819, 215+i, 0.5, 0.5);
		g.draw(shape1);
		g.fill(shape1);
		//g.drawString(check1,600+ a, 400+b);
		this.validate();
//	}

}
	
	for(i=0;i<20;i++){
		

		//g.setBackground(Color.YELLOW);
		g.setColor(Color.gray);
		
		Rectangle2D.Double shape1 = new Rectangle2D.Double(869, 215+i, 0.5, 0.5);
		/* Construct a shape and draw it */
		Ellipse2D.Double shape = new Ellipse2D.Double(869, 215+i, 0.5, 0.5);
		g.draw(shape1);
		g.fill(shape1);
		//g.drawString(check1,600+ a, 400+b);
		this.validate();
//	}

}
	
	for(i=0;i<50;i++){
		

		//g.setBackground(Color.YELLOW);
		g.setColor(Color.gray);
		
		Rectangle2D.Double shape1 = new Rectangle2D.Double(819+i, 235, 0.5, 0.5);
		/* Construct a shape and draw it */
		Ellipse2D.Double shape = new Ellipse2D.Double(819+i, 235, 0.5, 0.5);
		g.draw(shape1);
		g.fill(shape1);
		//g.drawString(check1,600+ a, 400+b);
		this.validate();
//	}

}
//kaisa	
	g.setColor(Color.white);
//	for(int j=0;j<500;j++){
//		Ellipse2D.Double shape = new Ellipse2D.Double(400+j, 600, 5, 5);
//		g.draw(shape);
//		g.fill(shape);
//		//g.drawString(check1,600+ a, 400+b);
//		this.validate();
//	}
	
	
	
	for(int j=200;j<700;j++){
		Rectangle2D.Double shape1 = new Rectangle2D.Double(400, j, 5, 5);
		Ellipse2D.Double shape = new Ellipse2D.Double(400, j, 5, 5);
		g.draw(shape1);
		g.fill(shape1);
		//g.drawString(check1,600+ a, 400+b);
		this.validate();
	}
	
	for(int j=200;j<700;j++){
		Rectangle2D.Double shape1 = new Rectangle2D.Double(899, j, 5, 5);
		Ellipse2D.Double shape = new Ellipse2D.Double(899, j, 5, 5);
		g.draw(shape1);
		g.fill(shape1);
		//g.drawString(check1,600+ a, 400+b);
		this.validate();
	}
	
	//
	for(int j=0;j<15;j++){
		Rectangle2D.Double shape1 = new Rectangle2D.Double(385+j, 700, 5, 5);
		Ellipse2D.Double shape = new Ellipse2D.Double(385+j, 700, 5, 5);
		g.draw(shape);
		g.fill(shape);
		//g.drawString(check1,600+ a, 400+b);
		this.validate();
	}
	
	for(int j=0;j<15;j++){
		Rectangle2D.Double shape1 = new Rectangle2D.Double(385+j, 675, 5, 5);
		Ellipse2D.Double shape = new Ellipse2D.Double(385+j, 675, 5, 5);
		g.draw(shape);
		g.fill(shape);
		//g.drawString(check1,600+ a, 400+b);
		this.validate();
	}
	
	for(int j=0;j<15;j++){
		Rectangle2D.Double shape1 = new Rectangle2D.Double(385+j, 650, 5, 5);
		Ellipse2D.Double shape = new Ellipse2D.Double(385+j, 650, 5, 5);
		g.draw(shape);
		g.fill(shape);
		//g.drawString(check1,600+ a, 400+b);
		this.validate();
	}
	
	for(int j=0;j<15;j++){
		Rectangle2D.Double shape1 = new Rectangle2D.Double(385+j, 625, 5, 5);
		Ellipse2D.Double shape = new Ellipse2D.Double(385+j, 625, 5, 5);
		g.draw(shape);
		g.fill(shape);
		//g.drawString(check1,600+ a, 400+b);
		this.validate();
	}
	
	for(int j=0;j<15;j++){
		Rectangle2D.Double shape1 = new Rectangle2D.Double(385+j, 600, 5, 5);
		Ellipse2D.Double shape = new Ellipse2D.Double(385+j, 600, 5, 5);
		g.draw(shape);
		g.fill(shape);
		//g.drawString(check1,600+ a, 400+b);
		this.validate();
	}
	
	for(int j=0;j<15;j++){
		Rectangle2D.Double shape1 = new Rectangle2D.Double(385+j, 575, 5, 5);
		Ellipse2D.Double shape = new Ellipse2D.Double(385+j, 575, 5, 5);
		g.draw(shape);
		g.fill(shape);
		//g.drawString(check1,600+ a, 400+b);
		this.validate();
	}
	
	for(int j=0;j<15;j++){
		Rectangle2D.Double shape1 = new Rectangle2D.Double(385+j, 550, 5, 5);
		Ellipse2D.Double shape = new Ellipse2D.Double(385+j, 550, 5, 5);
		g.draw(shape);
		g.fill(shape);
		//g.drawString(check1,600+ a, 400+b);
		this.validate();
	}
	
	for(int j=0;j<15;j++){
		Rectangle2D.Double shape1 = new Rectangle2D.Double(385+j, 525, 5, 5);
		Ellipse2D.Double shape = new Ellipse2D.Double(385+j, 525, 5, 5);
		g.draw(shape);
		g.fill(shape);
		//g.drawString(check1,600+ a, 400+b);
		this.validate();
	}
	
	for(int j=0;j<15;j++){
		Rectangle2D.Double shape1 = new Rectangle2D.Double(385+j, 500, 5, 5);
		Ellipse2D.Double shape = new Ellipse2D.Double(385+j, 500, 5, 5);
		g.draw(shape);
		g.fill(shape);
		//g.drawString(check1,600+ a, 400+b);
		this.validate();
	}
	
	for(int j=0;j<15;j++){
		Rectangle2D.Double shape1 = new Rectangle2D.Double(385+j, 475, 5, 5);
		Ellipse2D.Double shape = new Ellipse2D.Double(385+j, 475, 5, 5);
		g.draw(shape);
		g.fill(shape);
		//g.drawString(check1,600+ a, 400+b);
		this.validate();
	}
	
	for(int j=0;j<15;j++){
		Rectangle2D.Double shape1 = new Rectangle2D.Double(385+j, 450, 5, 5);
		Ellipse2D.Double shape = new Ellipse2D.Double(385+j, 450, 5, 5);
		g.draw(shape);
		g.fill(shape);
		//g.drawString(check1,600+ a, 400+b);
		this.validate();
	}
	
	for(int j=0;j<15;j++){
		Rectangle2D.Double shape1 = new Rectangle2D.Double(385+j, 425, 5, 5);
		Ellipse2D.Double shape = new Ellipse2D.Double(385+j, 425, 5, 5);
		g.draw(shape);
		g.fill(shape);
		//g.drawString(check1,600+ a, 400+b);
		this.validate();
	}
	
	for(int j=0;j<15;j++){
		Rectangle2D.Double shape1 = new Rectangle2D.Double(385+j, 400, 5, 5);
		Ellipse2D.Double shape = new Ellipse2D.Double(385+j, 400, 5, 5);
		g.draw(shape);
		g.fill(shape);
		//g.drawString(check1,600+ a, 400+b);
		this.validate();
	}
	
	for(int j=0;j<15;j++){
		Rectangle2D.Double shape1 = new Rectangle2D.Double(385+j, 375, 5, 5);
		Ellipse2D.Double shape = new Ellipse2D.Double(385+j, 375, 5, 5);
		g.draw(shape);
		g.fill(shape);
		//g.drawString(check1,600+ a, 400+b);
		this.validate();
	}
	
	for(int j=0;j<15;j++){
		Rectangle2D.Double shape1 = new Rectangle2D.Double(385+j, 350, 5, 5);
		Ellipse2D.Double shape = new Ellipse2D.Double(385+j, 350, 5, 5);
		g.draw(shape);
		g.fill(shape);
		//g.drawString(check1,600+ a, 400+b);
		this.validate();
	}
	
	
	
	
	for(int j=0;j<50;j++){
		Rectangle2D.Double shape1 = new Rectangle2D.Double(420+j, 700, 1, 1);
		Ellipse2D.Double shape = new Ellipse2D.Double(420+j, 700, 1, 1);
		g.draw(shape1);
		g.fill(shape1);
		//g.drawString(check1,600+ a, 400+b);
		this.validate();
	}
	
	for(int j=0;j<50;j++){
		Rectangle2D.Double shape1 = new Rectangle2D.Double(420+j, 675, 1, 1);
		Ellipse2D.Double shape = new Ellipse2D.Double(420+j, 675, 1, 1);
		g.draw(shape1);
		g.fill(shape1);
		//g.drawString(check1,600+ a, 400+b);
		this.validate();
	}
	
	for(int j=0;j<50;j++){
		Rectangle2D.Double shape1 = new Rectangle2D.Double(420+j, 650, 1, 1);
		Ellipse2D.Double shape = new Ellipse2D.Double(420+j, 650, 1, 1);
		g.draw(shape1);
		g.fill(shape1);
		//g.drawString(check1,600+ a, 400+b);
		this.validate();
	}
	//hey
	for(int j=0;j<50;j++){
		Rectangle2D.Double shape1 = new Rectangle2D.Double(420+j, 625, 1, 1);
		Ellipse2D.Double shape = new Ellipse2D.Double(420+j, 625, 1, 1);
		g.draw(shape1);
		g.fill(shape1);
		//g.drawString(check1,600+ a, 400+b);
		this.validate();
	}
	
	for(int j=0;j<50;j++){
		Rectangle2D.Double shape1 = new Rectangle2D.Double(420+j, 600, 1, 1);
		Ellipse2D.Double shape = new Ellipse2D.Double(420+j, 600, 1, 1);
		g.draw(shape1);
		g.fill(shape1);
		//g.drawString(check1,600+ a, 400+b);
		this.validate();
	}
	
	for(int j=0;j<50;j++){
		Rectangle2D.Double shape1 = new Rectangle2D.Double(420+j, 575, 1, 1);
		Ellipse2D.Double shape = new Ellipse2D.Double(420+j, 575, 1, 1);
		g.draw(shape1);
		g.fill(shape1);
		//g.drawString(check1,600+ a, 400+b);
		this.validate();
	}
	
	for(int j=0;j<50;j++){
		Rectangle2D.Double shape1 = new Rectangle2D.Double(420+j, 550, 1, 1);
		Ellipse2D.Double shape = new Ellipse2D.Double(420+j, 550, 1, 1);
		g.draw(shape1);
		g.fill(shape1);
		//g.drawString(check1,600+ a, 400+b);
		this.validate();
	}
	
	for(int j=0;j<50;j++){
		Rectangle2D.Double shape1 = new Rectangle2D.Double(420+j, 525, 1, 1);
		Ellipse2D.Double shape = new Ellipse2D.Double(420+j, 525, 1, 1);
		g.draw(shape1);
		g.fill(shape1);
		//g.drawString(check1,600+ a, 400+b);
		this.validate();
	}
	
	for(int j=0;j<50;j++){
		Rectangle2D.Double shape1 = new Rectangle2D.Double(420+j, 500, 1, 1);
		Ellipse2D.Double shape = new Ellipse2D.Double(420+j, 500, 1, 1);
		g.draw(shape1);
		g.fill(shape1);
		//g.drawString(check1,600+ a, 400+b);
		this.validate();
	}
	
	for(int j=0;j<50;j++){
		Rectangle2D.Double shape1 = new Rectangle2D.Double(420+j, 475, 1, 1);
		Ellipse2D.Double shape = new Ellipse2D.Double(420+j, 475, 1, 1);
		g.draw(shape1);
		g.fill(shape1);
		//g.drawString(check1,600+ a, 400+b);
		this.validate();
	}
	
	for(int j=0;j<50;j++){
		Rectangle2D.Double shape1 = new Rectangle2D.Double(420+j, 450, 1, 1);
		Ellipse2D.Double shape = new Ellipse2D.Double(420+j, 450, 1, 1);
		g.draw(shape1);
		g.fill(shape1);
		//g.drawString(check1,600+ a, 400+b);
		this.validate();
	}
	
	for(int j=0;j<50;j++){
		Rectangle2D.Double shape1 = new Rectangle2D.Double(420+j, 425, 1, 1);
		Ellipse2D.Double shape = new Ellipse2D.Double(420+j, 425, 1, 1);
		g.draw(shape1);
		g.fill(shape1);
		//g.drawString(check1,600+ a, 400+b);
		this.validate();
	}
	
	for(int j=0;j<50;j++){
		Rectangle2D.Double shape1 = new Rectangle2D.Double(420+j, 400, 1, 1);
		Ellipse2D.Double shape = new Ellipse2D.Double(420+j, 400, 1, 1);
		g.draw(shape1);
		g.fill(shape1);
		//g.drawString(check1,600+ a, 400+b);
		this.validate();
	}
	
	for(int j=0;j<50;j++){
		Rectangle2D.Double shape1 = new Rectangle2D.Double(420+j, 375, 1, 1);
		Ellipse2D.Double shape = new Ellipse2D.Double(420+j, 375, 1, 1);
		g.draw(shape1);
		g.fill(shape1);
		//g.drawString(check1,600+ a, 400+b);
		this.validate();
	}
	/// hi amay
	for(int j=0;j<50;j++){
		Rectangle2D.Double shape1 = new Rectangle2D.Double(420+j, 350, 1, 1);
		Ellipse2D.Double shape = new Ellipse2D.Double(420+j, 350, 1, 1);
		g.draw(shape1);
		g.fill(shape1);
		//g.drawString(check1,600+ a, 400+b);
		this.validate();
	}
	
	
	
	
	
	
	for(int gh=0,j=704;gh<10501;gh+=750,j-=25){
		g.drawString(gh+" bp",330 ,j );
	}
    int length2 = length1-1;
    // System.out.println(g.getFont()+" "+g.getFontMetrics());
	int length69 = plasmidsub.length() + plasmidsub1.length();
	int length70 = plasmidsub2.length() + plasmidsub3.length();
	g.setFont(new Font("TimesRoman", Font.PLAIN, 30));
	g.drawString("Gel Electrophoresis ",550 ,100 );
	g.setFont(new Font("Dialog", Font.PLAIN, 12));
	g.drawString("MW",435 ,190 );
	g.drawString("ED",515 ,190 );
	g.drawString("DD",595 ,190 );
	g.drawString("R1",680 ,190 );
	g.drawString("R2",760 ,190 );
	g.drawString("S",840 ,190 );
	g.drawString("MW = Molecular Weight",950 ,550 );
	g.drawString("ED = Encoded Data ( "+length2+" bp )",950 ,575 );
	g.drawString("DD = Decloned Data ( "+length2+" bp )",950 ,600 );
	g.drawString("R1 = Restriction Enzyme ( "+plasmidname+" ) ( "+length69+" bp )",950 ,625 );
	g.drawString("R1 = Restriction Enzyme ( "+plasmidname1+" ) ( "+length70+" bp )",950 ,650 );
	g.drawString("S = Sample",950 ,675 );
	g.setColor(Color.white);
	
	double length = (double) length2;
	double tan = 25;
	double tan2 = 750;
	double check = (tan/tan2)*length;
	double tan3 = 5;
	double check1 = 700-check;
	double lengthpl = (double) length69;
	double checkpl = (tan/tan2)*lengthpl;
	double checkpl1 = 700-checkpl;
	double lengthpl1 = (double) length70;
	double checkpl2 = (tan/tan2)*lengthpl1;
	double checkpl3 = 700-checkpl2;
	System.out.println(check1);
	
	//System.out.println(plasmidname+" "+plasmidname1+" "+plasmidsub+" "+plasmidsub1+" "+plasmidsub2+" "+plasmidsub3);
	
	for(int j=0;j<40;j++){
		Rectangle2D.Double shape1 = new Rectangle2D.Double(499+j, check1, 10, 10);
		Ellipse2D.Double shape = new Ellipse2D.Double(120+j, 50, 20, 20);
		g.draw(shape1);
		g.fill(shape1);
		//g.drawString(check1,600+ a, 400+b);
		this.validate();
	}
//	for(int j=0;j<40;j++){
//		Rectangle2D.Double shape1 = new Rectangle2D.Double(499+j, check1, 15, 15);
//		Ellipse2D.Double shape = new Ellipse2D.Double(120+j, 50, 20, 20);
//		g.draw(shape1);
//		g.fill(shape1);
//		//g.drawString(check1,600+ a, 400+b);
//		this.validate();
//	}
	for(int j=0;j<40;j++){
		Rectangle2D.Double shape1 = new Rectangle2D.Double(579+j, check1, 10, 10);
		Ellipse2D.Double shape = new Ellipse2D.Double(120+j, 50, 20, 20);
		g.draw(shape1);
		g.fill(shape1);
		//g.drawString(check1,600+ a, 400+b);
		this.validate();
	}
	for(int j=0;j<40;j++){
		Rectangle2D.Double shape1 = new Rectangle2D.Double(659+j, checkpl1, 10, 10);
		Ellipse2D.Double shape = new Ellipse2D.Double(120+j, 50, 20, 20);
		g.draw(shape1);
		g.fill(shape1);
		//g.drawString(check1,600+ a, 400+b);
		this.validate();
	}
	for(int j=0;j<40;j++){
		Rectangle2D.Double shape1 = new Rectangle2D.Double(739+j, checkpl3, 10, 10);
		Ellipse2D.Double shape = new Ellipse2D.Double(120+j, 50, 20, 20);
		g.draw(shape1);
		g.fill(shape1);
		//g.drawString(check1,600+ a, 400+b);
		this.validate();
	}
	for(int j=0;j<40;j++){
		Rectangle2D.Double shape1 = new Rectangle2D.Double(819+j, 500, 10, 10);
		Ellipse2D.Double shape = new Ellipse2D.Double(120+j, 50, 20, 20);
		g.draw(shape1);
		g.fill(shape1);
		//g.drawString(check1,600+ a, 400+b);
		this.validate();
	}
	
	
	//this.validate();
	//this.repaint();
	}

	public  void amay()
	{
		
		Gel1();

		this.paint(null);
		
	}
}