private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        // Create Offer
        try {
            if (jTextField1.getText().trim().equals(jTextField3.getText().trim())) {
                JOptionPane.showMessageDialog(this, "Asset and currency type id cannot be same", "Asset validation", JOptionPane.ERROR_MESSAGE);
                return;
            }

            if (jTextField2.getText().trim().equals(jTextField4.getText().trim())) {
                JOptionPane.showMessageDialog(this, "Asset and currency account id cannot be same", "Asset account validation", JOptionPane.ERROR_MESSAGE);
                return;
            }
            setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
            int selling = 1;
            if (jComboBox3.getSelectedItem().toString().equals("Buy")) {
                selling = 0;
            }
            boolean status = Market.createOrder(serverID, nymID, jTextField1.getText(), jTextField2.getText(), jTextField3.getText(), jTextField4.getText(), jTextField5.getText(), jTextField6.getText(), jTextField7.getText(), jTextField8.getText(), selling);
            setCursor(Cursor.getDefaultCursor());
            if (status) {
                JOptionPane.showMessageDialog(this, "Order created successfully", "Order Creation", JOptionPane.INFORMATION_MESSAGE);
                
                Helpers.longDelay();
                
                MainPage.refreshMarketOfferList(serverID, nymID);
                // DEBUGGING: The above call is what happens after the order creation.
            } else {
                JOptionPane.showMessageDialog(this, "Order cannot be created", "Order Creation", JOptionPane.ERROR_MESSAGE);
            }
            this.dispose();
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            setCursor(Cursor.getDefaultCursor());
        }
    }//GEN-LAST:event_jButton1ActionPerformed