@Override
	public void actionPerformed(ActionEvent arg0) {
		int orderId = -1;
		
        JTextField field1 = new JTextField("");
        
        JPanel panel = new JPanel(new GridLayout(0, 1));
        panel.add(new JLabel("Finished order id:"));
        panel.add(field1);
 
        int result = JOptionPane.showConfirmDialog(frame, panel, "Order status window",
            JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE);
        if (result == JOptionPane.OK_OPTION && !field1.getText().equals("")) {
        	
        	
			try {
				
				orderId = Integer.parseInt(field1.getText());
				
				PreparedStatement preparedStatement = orders.getConnection().prepareStatement("update orders set order_status = ? where order_id = ?");
				preparedStatement.setString(1,"FINISHED");
				preparedStatement.setInt(2,orderId);
		
				preparedStatement.execute();
				DefaultTableModel model = (DefaultTableModel)(table.getModel());
				
				int rowToChange = orderId-1;
				model.setValueAt("FINISHED", rowToChange, 4);
				
				JOptionPane.showMessageDialog(frame, "Order "+orderId+" status updated.");
				
			} catch (NumberFormatException e) {
				JOptionPane.showMessageDialog(frame, "This is not correct order id.");
			} catch (SQLException e) {
				JOptionPane.showMessageDialog(frame, "Couldn't find this id.");
				
			}
		}
        else if (result == JOptionPane.CANCEL_OPTION) {
        }
	}