private void flashPartitionButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_flashPartitionButtonActionPerformed
        if (jList3.getSelectedValuesList() == null || jList3.getSelectedValuesList().isEmpty()) {
            logger.log(Level.ERROR, "No partition was selected! Please select a partition and try again!");
            return;
        }
        
        if (serialNumber == null || serialNumber.equals("")) {
            logger.log(Level.ERROR, "No device was detected/Value was null! Please connect an Android device in Fastboot-mode to your computer and try again!");
            return;
        }
        
        FastbootController fbController = adbController.getFastbootController();
        
        try {
            if (cleanFlash)
                fbController.executeFastbootCommand(serialNumber, new String[]{"format", (String) jList3.getSelectedValue()});
            fbController.executeFastbootCommand(serialNumber, new String[]{"flash", (String) jList3.getSelectedValue(), jTextField1.getText()});
        } catch (IOException ex) {
            logger.log(Level.ERROR, "An error occurred while flashing " + jTextField1.getText() + "to " + serialNumber + "!: " + ex.toString() + "\n"
                    + "The error stack trace will be printed to the console...");
            ex.printStackTrace(System.err);
        }
    }//GEN-LAST:event_flashPartitionButtonActionPerformed