public OdigoiList() {
		con = new Mysql();
		setTitle("Lista Odigwn");
		/* vgazei to para8uro sto kedro tis othonis me diastaseis 355x40 */
		Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
		this.setBounds(dim.width/2-150, dim.height/2-125, 355, 400);
		/*--------------*/
		this.setResizable(false);
		getContentPane().setBackground(Color.WHITE);
		getContentPane().setLayout(null);
		
		listModel = new DefaultListModel<String>();
		odigoiList = new JList<String>(listModel);
		getContentPane().add(odigoiList);
		
		JScrollPane scrollPane = new JScrollPane(odigoiList);
		scrollPane.setBounds(0, 0, 355, 340);
		getContentPane().add(scrollPane);
		
		JButton editButton = new JButton("Epe3ergasia");
		editButton.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseClicked(MouseEvent arg0) {
				try{
					/*
					 * anoigei to parathiro epexergasias gia ton epilegmeno odigo
					 */
					odigoiInfo=odigoi.get(odigoiList.getSelectedIndex());
					OdigoiAdd frame = new OdigoiAdd(Integer.parseInt(odigoiInfo.get("id")));
					frame.setVisible(true);
				}catch(Exception e){
					e.printStackTrace();
				}
			}
		});
		editButton.setBounds(0, 338, 175, 34);
		getContentPane().add(editButton);
		
		JButton deleteButton = new JButton("Diagrafh");
		deleteButton.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseClicked(MouseEvent arg0) {
				/*
				 * diagrafi ton epilegmeno odigo epeita apo erwthsh
				 */
				int dialogResult = JOptionPane.showConfirmDialog (null, "Eiste sigouri oti thelete na diagrapsete ton sigkekrimeno odigo?","Diagrafh",JOptionPane.YES_NO_OPTION);
				if(dialogResult == JOptionPane.YES_OPTION){
					delete(Integer.parseInt(odigoiId.get(odigoiList.getSelectedIndex())),odigoiList.getSelectedIndex());
				}
			}
		});
		deleteButton.setBounds(175, 338, 175, 34);
		getContentPane().add(deleteButton);
		
		addOdigous();
		
		
	}