public boolean openOrderGUI(){
        DefaultTableModel model = (DefaultTableModel) itemsTable.getModel();
        boolean result = false;
        if (itemsTable.getSelectedRow() == -1) {
            if (itemsTable.getRowCount() == 0) {
                JOptionPane.showMessageDialog(this, "table is empty.");
            } else {
                JOptionPane.showMessageDialog(this, "Select from list please.");
            }
        }
            else{
                    String nameToOrder = String.valueOf(itemsTable.getValueAt(itemsTable.getSelectedRow(), 0));
                    String amount = String.valueOf(itemsTable.getValueAt(itemsTable.getSelectedRow(), 1));
                    productLabel.setText(nameToOrder);
                    amountLabel.setText(amount);
                    result=true;
                    }
        return(result);
    }