private void btnOpenFileActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnOpenFileActionPerformed
    {//GEN-HEADEREND:event_btnOpenFileActionPerformed
        JFileChooser fc = new JFileChooser();
        fc.setFileSelectionMode(JFileChooser.FILES_ONLY);
        fc.setDialogTitle("Open something interesting...");
        fc.addChoosableFileFilter(new FileNameExtensionFilter("Supported file formats", /*"iso",*/ "rarc", "arc"));
        //fc.addChoosableFileFilter(new FileNameExtensionFilter("Wii ISO", "iso"));
        fc.addChoosableFileFilter(new FileNameExtensionFilter("Wii RARC archive", "rarc", "arc"));
        String lastfile = Preferences.userRoot().get("lastFile", null);
        if (lastfile != null) fc.setSelectedFile(new File(lastfile));
        if (fc.showOpenDialog(this) != JFileChooser.APPROVE_OPTION)
            return;
        
        String selfile = fc.getSelectedFile().getPath();
        Preferences.userRoot().put("lastFile", selfile);
        
        try { if (archive != null) archive.close(); }
        catch (IOException ex) {}
        archive = null;
        
        /*if (archive == null)
        {
            try { archive = new WiiIsoFilesystem(new ExternalFile(selfile)); }
            catch (IOException ex)
            {
                if (!ex.getMessage().startsWith("!File isn't "))
                {
                    lblStatusLabel.setText("Failed to open the file: "+ex.getMessage());
                    return;
                }
                archive = null;
            }
        }*/
        
        if (archive == null)
        {
            try { archive = new RarcFilesystem(new ExternalFile(selfile)); }
            catch (IOException ex)
            {
                if (!ex.getMessage().startsWith("!File isn't "))
                {
                    lblStatusLabel.setText("Failed to open the file: "+ex.getMessage());
                    return;
                }
                archive = null;
            }
        }
        
        populateFSList();
        lblStatusLabel.setText("");
        selectedPath = "";
        
        btnNewFolder.setEnabled(true);
        btnAddFileFolder.setEnabled(true);
        btnExtractItem.setEnabled(false);
        btnReplaceItem.setEnabled(false);
        btnRenameItem.setEnabled(false);
        btnDeleteItem.setEnabled(false);
    }//GEN-LAST:event_btnOpenFileActionPerformed