private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
        try {
        int index = interfaceList.getSelectedIndex();
        if((!model.isEmpty() ||  model.getElementAt(0) != "<html><i>Your order is empty</i></html>") && index >= 0) {     
            if(model.isEmpty()) { model.addElement("<html><i>Your order is empty</i></html>");}  
                    main.result -= results.get(index);
                    results.remove(index);
                    model.removeElementAt(index);
                    returnArrayListSize();
                    if(model.isEmpty()) { model.addElement("<html><i>Your order is empty</i></html>");}
                    interfaceOrderPrice.setText("£" + String.format("%.2f", main.result));
                        if(interfaceOrderPrice.getText().contains("-")) {
                            interfaceOrderPrice.setText("£0");
                        }
        } else {
            if(model.isEmpty()) { model.addElement("<html><i>Your order is empty</i></html>");}
            JOptionPane.showMessageDialog(null, "There are no items to remove or you have not selected an item  ", "Item Remove Error", JOptionPane.ERROR_MESSAGE);
     
               }
        
        } catch(Exception e) {
            if(model.isEmpty()) { model.addElement("<html><i>Your order is empty</i></html>");}
            JOptionPane.showMessageDialog(null, "There are no items to remove or you have not selected an item  ", "Item Remove Error", JOptionPane.ERROR_MESSAGE);}
    }//GEN-LAST:event_jButton2ActionPerformed