@SuppressWarnings({ "unchecked", "rawtypes" })
	public Generator() {
		setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
		setTitle("ASM Generator");
		setBounds(100, 100, 500, 351);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(null);
		
		JLabel lblNewLabel = new JLabel("Etiquetas");
		lblNewLabel.setFont(new Font("Lucida Console", Font.PLAIN, 11));
		lblNewLabel.setBounds(10, 26, 74, 14);
		contentPane.add(lblNewLabel);
		
		final
		JComboBox cbLabel = new JComboBox(Listcombobox);
		cbLabel.setBounds(84, 22, 51, 20);
		contentPane.add(cbLabel);
		
		JLabel lblOrg = new JLabel("ORG");
		lblOrg.setBounds(10, 67, 46, 14);
		contentPane.add(lblOrg);
		
		final
		JComboBox cbOrg = new JComboBox(ListDir);
		cbOrg.setBounds(47, 64, 51, 20);
		contentPane.add(cbOrg);
		
		JLabel lblNewLabel_1 = new JLabel("DS");
		lblNewLabel_1.setBounds(127, 67, 46, 14);
		contentPane.add(lblNewLabel_1);
		
		final
		JComboBox cbDS = new JComboBox(ListDir);
		cbDS.setBounds(156, 64, 51, 20);
		contentPane.add(cbDS);
		
		JLabel lblDc = new JLabel("DC");
		lblDc.setBounds(234, 67, 46, 14);
		contentPane.add(lblDc);
		
		final
		JComboBox cbDC = new JComboBox(ListDir);
		cbDC.setBounds(254, 64, 51, 20);
		contentPane.add(cbDC);
		
		final 
		JProgressBar progressBar = new JProgressBar();
		progressBar.setStringPainted(true);
		progressBar.setMinimum(0);
		progressBar.setBounds(159, 284, 146, 19);
		contentPane.add(progressBar);
		
		final
		JLabel label = new JLabel("");
		label.setBounds(317, 284, 130, 19);
		contentPane.add(label);
		
		JLabel lblEqu = new JLabel("EQU");
		lblEqu.setBounds(332, 67, 46, 14);
		contentPane.add(lblEqu);
		
		final 
		JComboBox cbEQ = new JComboBox(ListDir);
		cbEQ.setBounds(360, 64, 51, 20);
		contentPane.add(cbEQ);
		
		final
		JComboBox cbInh = new JComboBox(Listcombobox);
		cbInh.setBounds(47, 112, 51, 20);
		contentPane.add(cbInh);
		
		final
		JComboBox cbDir = new JComboBox(Listcombobox);
		cbDir.setBounds(135, 112, 51, 20);
		contentPane.add(cbDir);
		
		final
		JComboBox cbExt = new JComboBox(Listcombobox);
		cbExt.setBounds(229, 112, 51, 20);
		contentPane.add(cbExt);
		
		final
		JComboBox cbImm8 = new JComboBox(Listcombobox);
		cbImm8.setBounds(327, 112, 51, 20);
		contentPane.add(cbImm8);
		
		final
		JComboBox cbImm16 = new JComboBox(Listcombobox);
		cbImm16.setBounds(431, 112, 51, 20);
		contentPane.add(cbImm16);
		
		final
		JComboBox cb5 = new JComboBox(Listcombobox);
		cb5.setBounds(69, 160, 51, 20);
		contentPane.add(cb5);
		
		final
		JComboBox cbPre = new JComboBox(Listcombobox);
		cbPre.setBounds(229, 160, 51, 20);
		contentPane.add(cbPre);
		
		final
		JComboBox cbAcum = new JComboBox(Listcombobox);
		cbAcum.setBounds(360, 160, 51, 20);
		contentPane.add(cbAcum);
		
		final
		JComboBox cb9 = new JComboBox(Listcombobox);
		cb9.setBounds(69, 194, 51, 20);
		contentPane.add(cb9);
		
		final
		JComboBox cb16 = new JComboBox(Listcombobox);
		cb16.setBounds(201, 194, 51, 20);
		contentPane.add(cb16);
		
		final
		JComboBox cbIDX2 = new JComboBox(Listcombobox);
		cbIDX2.setBounds(314, 194, 51, 20);
		contentPane.add(cbIDX2);
		
		final
		JComboBox cbDIDX = new JComboBox(Listcombobox);
		cbDIDX.setBounds(431, 194, 51, 20);
		contentPane.add(cbDIDX);
		
		final
		JComboBox cbRel8 = new JComboBox(Listcombobox);
		cbRel8.setBounds(47, 242, 51, 20);
		contentPane.add(cbRel8);
		
		final
		JComboBox cbRel16 = new JComboBox(Listcombobox);
		cbRel16.setBounds(214, 242, 51, 20);
		contentPane.add(cbRel16);
		
		final
		JComboBox cbRel9 = new JComboBox(Listcombobox);
		cbRel9.setBounds(360, 242, 51, 20);
		contentPane.add(cbRel9);
		
		ReadFile();
		//System.out.println(" "+ Inst.elementAt(591)); //We test the Vector!
		
		
		
//##########    Button Generate, Where almost all the Magic Stuff is.... #############
		
		final JButton btnGenerate = new JButton("Generate!");
		btnGenerate.addActionListener(new ActionListener() {
			
			public void actionPerformed(ActionEvent e) {
				
				int noInh = (Integer) cbInh.getSelectedItem();
				int noDir  = (Integer) cbDir.getSelectedItem();
				int noExt = (Integer) cbExt.getSelectedItem();
				int noImm8 = (Integer) cbImm8.getSelectedItem();
				int noImm16 = (Integer) cbImm16.getSelectedItem();
				int noIDX5 = (Integer) cb5.getSelectedItem();
				int noIDX9 = (Integer) cb9.getSelectedItem();
				int noIDX16 = (Integer) cb16.getSelectedItem();
				int noIdxPre = (Integer) cbPre.getSelectedItem();
				int noIdxAcum = (Integer) cbAcum.getSelectedItem();
				int noIDX2 = (Integer) cbIDX2.getSelectedItem();
				int noDIDX = (Integer) cbDIDX.getSelectedItem();
				int noREL8 = (Integer) cbRel8.getSelectedItem();
				int noREL16 = (Integer) cbRel16.getSelectedItem();
				int noREL9 = (Integer) cbRel9.getSelectedItem();

				
				
				Integer noLabls = (Integer) cbLabel.getSelectedItem();
				Integer noInst =  noInh + noDir + noExt + noImm8 + noImm16 + noIDX5 + noIDX9 + noIDX16 + noIdxPre + noIdxAcum + noIDX2 + noDIDX + noREL8 + noREL16 + noREL9;
				Integer noOper =  noDir + noExt + noImm8 + noImm16 + noIDX5 + noIDX9 + noIDX16 + noIdxPre + noIdxAcum + noIDX2 + noDIDX + noREL8 + noREL16 + noREL9;
				
				Integer noORG = (Integer) cbOrg.getSelectedItem();
				Integer noDS = (Integer) cbDS.getSelectedItem();
				Integer noDC = (Integer) cbDC.getSelectedItem();
				Integer noEQ = (Integer) cbEQ.getSelectedItem();
							
				/*	Let's see what the ComboBox has return?
				 * 
					System.out.println(" "+cbOper.getSelectedItem());
					System.out.println(" "+cbInst.getSelectedItem());
					System.out.println(" "+cbLabel.getSelectedItem());
				*/	
				
				if(noOper > noInst)
				{
					JOptionPane.showMessageDialog(null, "Mas Operandos que Instrucciones","ERROR", 
					JOptionPane.ERROR_MESSAGE);	
				}
				else 
					if (noLabls > (noInst + noORG + noDS + noDC) )
					{
						JOptionPane.showMessageDialog(null, "Mas Etiquetas que Instrucciones","ERROR",			
						JOptionPane.ERROR_MESSAGE);	
					}
					else
							{
							
								int getMax = progressBar.getMaximum();
								int value = progressBar.getValue();
					
								while(value < getMax)
								{
									progressBar.setValue(value + 1);
		                            value++;
		                            
		                            try {
		                                Thread.sleep(2);
		                                } 
		                            catch (InterruptedException ex){}                           	                           
		                            
								}									
								
									String FileName = WriteFile(noLabls, noInst, noOper, noORG, noDS, noDC, noEQ, noInh, noDir, noExt, noImm8, noImm16, noIDX5, noIDX9, noIDX16, noIdxPre, noIdxAcum, noIDX2, noDIDX, noREL8, noREL16, noREL9 );
									label.setText("Name: "+FileName);
									btnGenerate.setEnabled(false);
									
								
							}
								
			}
		});
		
		btnGenerate.setBounds(47, 281, 89, 23);
		contentPane.add(btnGenerate);
		
		JLabel lblDirectivas = new JLabel("DIRECTIVAS");
		lblDirectivas.setBounds(191, 39, 74, 14);
		contentPane.add(lblDirectivas);
		
		JLabel lblSimples = new JLabel("SIMPLES");
		lblSimples.setBounds(196, 95, 56, 14);
		contentPane.add(lblSimples);
		
		JLabel lblInh = new JLabel("INH");
		lblInh.setBounds(22, 115, 46, 14);
		contentPane.add(lblInh);
		
		JLabel lblDir = new JLabel("DIR");
		lblDir.setBounds(113, 115, 46, 14);
		contentPane.add(lblDir);
		
		JLabel lblExt = new JLabel("EXT");
		lblExt.setBounds(206, 115, 46, 14);
		contentPane.add(lblExt);
		
		JLabel lblImm = new JLabel("IMM8");
		lblImm.setBounds(292, 115, 46, 14);
		contentPane.add(lblImm);
		
		JLabel lblImm_1 = new JLabel("IMM16");
		lblImm_1.setBounds(390, 115, 46, 14);
		contentPane.add(lblImm_1);
		
		JLabel lblIndexados = new JLabel("INDEXADOS");
		lblIndexados.setBounds(191, 143, 74, 14);
		contentPane.add(lblIndexados);
		
		JLabel lblIdx = new JLabel("IDX 5Bits");
		lblIdx.setBounds(10, 163, 58, 14);
		contentPane.add(lblIdx);
		
		JLabel lblIdxPrepost = new JLabel("IDX Pre/Post");
		lblIdxPrepost.setBounds(156, 163, 74, 14);
		contentPane.add(lblIdxPrepost);
				
		JLabel lblIdxAcum = new JLabel("IDX Acum");
		lblIdxAcum.setBounds(304, 163, 74, 14);
		contentPane.add(lblIdxAcum);
				
		JLabel lblIdx_1 = new JLabel("IDX1 9Bits");
		lblIdx_1.setBounds(10, 197, 62, 14);
		contentPane.add(lblIdx_1);
		
		JLabel lblIdxbits = new JLabel("IDX2 16Bits");
		lblIdxbits.setBounds(133, 197, 74, 14);
		contentPane.add(lblIdxbits);
				
		JLabel lblidx = new JLabel("[IDX2]");
		lblidx.setBounds(276, 197, 62, 14);
		contentPane.add(lblidx);
				
		JLabel lbldidx = new JLabel("[D,IDX]");
		lbldidx.setBounds(385, 197, 62, 14);
		contentPane.add(lbldidx);	
		
		JLabel lblRelativos = new JLabel("RELATIVOS");
		lblRelativos.setBounds(191, 225, 74, 14);
		contentPane.add(lblRelativos);
		
		JLabel lblRel = new JLabel("REL8");
		lblRel.setBounds(10, 245, 46, 14);
		contentPane.add(lblRel);
		
		JLabel lblRel_1 = new JLabel("REL16");
		lblRel_1.setBounds(172, 245, 46, 14);
		contentPane.add(lblRel_1);
		
		JLabel lblRel_2 = new JLabel("REL9");
		lblRel_2.setBounds(317, 245, 46, 14);
		contentPane.add(lblRel_2);
		
		JSeparator separator = new JSeparator();
		separator.setBounds(10, 92, 472, 2);
		contentPane.add(separator);
		
		JSeparator separator_1 = new JSeparator();
		separator_1.setBounds(10, 143, 472, 2);
		contentPane.add(separator_1);
		
		JSeparator separator_2 = new JSeparator();
		separator_2.setBounds(10, 222, 472, 2);
		contentPane.add(separator_2);
		
	}