public void actionPerformed(ActionEvent event) {
   if (event.getSource() == bstart) {
     selectframe.setVisible(false);
     for (int i = 0; i < typeButtons.length; i++)
       if (typeButtons[i].isSelected()) {
         new Thread(this).start();
         return;
       }
   } else if (event.getSource() == bcancel) selectframe.setVisible(false);
   else if (event.getSource() == bopen) {
     int row = table.getSelectedRow();
     if (row != -1) {
       ResourceEntry resourceEntry = (ResourceEntry) table.getValueAt(row, 0);
       NearInfinity.getInstance().showResourceEntry(resourceEntry);
       ((AbstractStruct) NearInfinity.getInstance().getViewable())
           .getViewer()
           .selectEntry(((Item) table.getValueAt(row, 2)).getName());
     }
   } else if (event.getSource() == bopennew) {
     int row = table.getSelectedRow();
     if (row != -1) {
       ResourceEntry resourceEntry = (ResourceEntry) table.getValueAt(row, 0);
       Resource resource = ResourceFactory.getResource(resourceEntry);
       new ViewFrame(resultFrame, resource);
       ((AbstractStruct) resource)
           .getViewer()
           .selectEntry(((Item) table.getValueAt(row, 2)).getName());
     }
   }
 }
 private void checkStruct(AbstractStruct struct) {
   List<StructEntry> flatList = struct.getFlatList();
   for (int i = 0; i < flatList.size(); i++) {
     if (flatList.get(i) instanceof StringRef) {
       StringRef ref = (StringRef) flatList.get(i);
       if (ref.getValue() >= 0 && ref.getValue() < strUsed.length) strUsed[ref.getValue()] = true;
     }
   }
 }