Program: 61942
Project: 61942
Buggy source:
public MainFrame(){
  super();
  try {
    flashPanel=new FlashPlayerPanel(this);
  }
 catch (  FlashUnsupportedException fue) {
  }
  boolean externalFlashPlayerUnavailable=flashPanel == null;
  mainRibbon=new MainFrameRibbon(this,getRibbon(),externalFlashPlayerUnavailable);
  int w=Configuration.guiWindowWidth.get();
  int h=Configuration.guiWindowHeight.get();
  Dimension dim=java.awt.Toolkit.getDefaultToolkit().getScreenSize();
  if (w > dim.width) {
    w=dim.width;
  }
  if (h > dim.height) {
    h=dim.height;
  }
  setSize(w,h);
  boolean maximizedHorizontal=Configuration.guiWindowMaximizedHorizontal.get();
  boolean maximizedVertical=Configuration.guiWindowMaximizedVertical.get();
  int state=0;
  if (maximizedHorizontal) {
    state|=JFrame.MAXIMIZED_HORIZ;
  }
  if (maximizedVertical) {
    state|=JFrame.MAXIMIZED_VERT;
  }
  setExtendedState(state);
  View.setWindowIcon(this);
  addWindowStateListener(new WindowStateListener(){
    @Override public void windowStateChanged(    WindowEvent e){
      int state=e.getNewState();
      Configuration.guiWindowMaximizedHorizontal.set((state & JFrame.MAXIMIZED_HORIZ) == JFrame.MAXIMIZED_HORIZ);
      Configuration.guiWindowMaximizedVertical.set((state & JFrame.MAXIMIZED_VERT) == JFrame.MAXIMIZED_VERT);
    }
  }
);
  addComponentListener(new ComponentAdapter(){
    @Override public void componentResized(    ComponentEvent e){
      int state=getExtendedState();
      if ((state & JFrame.MAXIMIZED_HORIZ) == 0) {
        Configuration.guiWindowWidth.set(getWidth());
      }
      if ((state & JFrame.MAXIMIZED_VERT) == 0) {
        Configuration.guiWindowHeight.set(getHeight());
      }
    }
  }
);
  addWindowListener(new WindowAdapter(){
    @Override public void windowClosing(    WindowEvent e){
      if (Main.proxyFrame != null) {
        if (Main.proxyFrame.isVisible()) {
          return;
        }
      }
      if (Main.loadFromMemoryFrame != null) {
        if (Main.loadFromMemoryFrame.isVisible()) {
          return;
        }
      }
      if (Main.loadFromCacheFrame != null) {
        if (Main.loadFromCacheFrame.isVisible()) {
          return;
        }
      }
      Main.exit();
    }
  }
);
  setTitle(ApplicationInfo.applicationVerName);
  swfs=new ArrayList<>();
  java.awt.Container cnt=getContentPane();
  cnt.setLayout(new BorderLayout());
  cnt.add(getRibbon(),BorderLayout.NORTH);
  detailPanel=new JPanel();
  detailPanel.setLayout(new CardLayout());
  JPanel whitePanel=new JPanel();
  whitePanel.setBackground(Color.white);
  detailPanel.add(whitePanel,DETAILCARDEMPTYPANEL);
  CardLayout cl2=(CardLayout)(detailPanel.getLayout());
  cl2.show(detailPanel,DETAILCARDEMPTYPANEL);
  UIManager.getDefaults().put("String_Node_Str",BasicTreeUI.class.getName());
  tagTree=new JTree((TreeModel)null);
  tagTree.setRootVisible(false);
  tagTree.addTreeSelectionListener(this);
  tagTree.setBackground(Color.white);
  tagTree.setUI(new BasicTreeUI(){
    @Override public void paint(    Graphics g,    JComponent c){
      setHashColor(Color.gray);
      super.paint(g,c);
    }
  }
);
  DragSource dragSource=DragSource.getDefaultDragSource();
  dragSource.createDefaultDragGestureRecognizer(tagTree,DnDConstants.ACTION_COPY_OR_MOVE,new DragGestureListener(){
    @Override public void dragGestureRecognized(    DragGestureEvent dge){
      dge.startDrag(DragSource.DefaultCopyDrop,new Transferable(){
        @Override public DataFlavor[] getTransferDataFlavors(){
          return new DataFlavor[]{DataFlavor.javaFileListFlavor};
        }
        @Override public boolean isDataFlavorSupported(        DataFlavor flavor){
          return flavor.equals(DataFlavor.javaFileListFlavor);
        }
        @Override public Object getTransferData(        DataFlavor flavor) throws UnsupportedFlavorException, IOException {
          if (flavor.equals(DataFlavor.javaFileListFlavor)) {
            List<File> files=new ArrayList<>();
            String tempDir=System.getProperty("String_Node_Str");
            if (!tempDir.endsWith(File.separator)) {
              tempDir+=File.separator;
            }
            Random rnd=new Random();
            tempDir+="String_Node_Str" + File.separator + "String_Node_Str"+ File.separator+ System.currentTimeMillis()+ "String_Node_Str"+ rnd.nextInt(1000);
            File fTempDir=new File(tempDir);
            if (!fTempDir.exists()) {
              if (!fTempDir.mkdirs()) {
                if (!fTempDir.exists()) {
                  throw new IOException("String_Node_Str" + fTempDir);
                }
              }
            }
            final ExportDialog export=new ExportDialog();
            try {
              File ftemp=new File(tempDir);
              files=exportSelection(errorHandler,tempDir,export);
              files.clear();
              File[] fs=ftemp.listFiles();
              files.addAll(Arrays.asList(fs));
              Main.stopWork();
            }
 catch (            IOException ex) {
              return null;
            }
            for (            File f : files) {
              f.deleteOnExit();
            }
            new File(tempDir).deleteOnExit();
            return files;
          }
          return null;
        }
      }
,new DragSourceListener(){
        @Override public void dragEnter(        DragSourceDragEvent dsde){
          enableDrop(false);
        }
        @Override public void dragOver(        DragSourceDragEvent dsde){
        }
        @Override public void dropActionChanged(        DragSourceDragEvent dsde){
        }
        @Override public void dragExit(        DragSourceEvent dse){
        }
        @Override public void dragDropEnd(        DragSourceDropEvent dsde){
          enableDrop(true);
        }
      }
);
    }
  }
);
  createContextMenu();
  TreeCellRenderer tcr=new DefaultTreeCellRenderer(){
    @Override public Component getTreeCellRendererComponent(    JTree tree,    Object value,    boolean sel,    boolean expanded,    boolean leaf,    int row,    boolean hasFocus){
      super.getTreeCellRendererComponent(tree,value,sel,expanded,leaf,row,hasFocus);
      Object val=value;
      if (val instanceof TagNode) {
        val=((TagNode)val).tag;
      }
      TagType type=getTagType(val);
      if (val instanceof SWFRoot) {
        setIcon(View.getIcon("String_Node_Str"));
      }
 else       if (type != null) {
        if (type == TagType.FOLDER && expanded) {
          type=TagType.FOLDER_OPEN;
        }
        String tagTypeStr=type.toString().toLowerCase().replace("String_Node_Str","String_Node_Str");
        setIcon(View.getIcon(tagTypeStr + "String_Node_Str"));
      }
 else {
      }
      String tos=value.toString();
      int sw=getFontMetrics(getFont()).stringWidth(tos);
      setPreferredSize(new Dimension(18 + sw,getPreferredSize().height));
      setUI(new BasicLabelUI());
      setOpaque(false);
      setBackgroundNonSelectionColor(Color.white);
      return this;
    }
  }
;
  tagTree.setCellRenderer(tcr);
  statusPanel=new MainFrameStatusPanel(this);
  cnt.add(statusPanel,BorderLayout.SOUTH);
  JPanel textTopPanel=new JPanel(new BorderLayout());
  textValue=new LineMarkedEditorPane();
  textTopPanel.add(new JScrollPane(textValue),BorderLayout.CENTER);
  textValue.setEditable(false);
  JPanel textButtonsPanel=new JPanel();
  textButtonsPanel.setLayout(new FlowLayout());
  textSaveButton=new JButton(translate("String_Node_Str"),View.getIcon("String_Node_Str"));
  textSaveButton.setMargin(new Insets(3,3,3,10));
  textSaveButton.setActionCommand(ACTION_SAVE_TEXT);
  textSaveButton.addActionListener(this);
  textEditButton=new JButton(translate("String_Node_Str"),View.getIcon("String_Node_Str"));
  textEditButton.setMargin(new Insets(3,3,3,10));
  textEditButton.setActionCommand(ACTION_EDIT_TEXT);
  textEditButton.addActionListener(this);
  textCancelButton=new JButton(translate("String_Node_Str"),View.getIcon("String_Node_Str"));
  textCancelButton.setMargin(new Insets(3,3,3,10));
  textCancelButton.setActionCommand(ACTION_CANCEL_TEXT);
  textCancelButton.addActionListener(this);
  textButtonsPanel.add(textEditButton);
  textButtonsPanel.add(textSaveButton);
  textButtonsPanel.add(textCancelButton);
  textSaveButton.setVisible(false);
  textCancelButton.setVisible(false);
  textTopPanel.add(textButtonsPanel,BorderLayout.SOUTH);
  displayWithPreview=new JPanel(new CardLayout());
  displayWithPreview.add(textTopPanel,CARDTEXTPANEL);
  fontPanel=new FontPanel(this);
  displayWithPreview.add(fontPanel,CARDFONTPANEL);
  Component leftComponent;
  displayPanel=new JPanel(new CardLayout());
  if (flashPanel != null) {
    JPanel flashPlayPanel=new JPanel(new BorderLayout());
    flashPlayPanel.add(flashPanel,BorderLayout.CENTER);
    flashPlayPanel.add(flashControls=new PlayerControls(flashPanel),BorderLayout.SOUTH);
    leftComponent=flashPlayPanel;
  }
 else {
    JPanel swtPanel=new JPanel(new BorderLayout());
    swtPanel.add(new JLabel("String_Node_Str" + translate("String_Node_Str") + "String_Node_Str",JLabel.CENTER),BorderLayout.CENTER);
    swtPanel.setBackground(View.DEFAULT_BACKGROUND_COLOR);
    leftComponent=swtPanel;
  }
  textValue.setContentType("String_Node_Str");
  previewSplitPane=new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
  previewSplitPane.setDividerLocation(300);
  JPanel pan=new JPanel(new BorderLayout());
  JLabel prevLabel=new HeaderLabel(translate("String_Node_Str"));
  prevLabel.setHorizontalAlignment(SwingConstants.CENTER);
  JLabel paramsLabel=new HeaderLabel(translate("String_Node_Str"));
  paramsLabel.setHorizontalAlignment(SwingConstants.CENTER);
  pan.add(prevLabel,BorderLayout.NORTH);
  viewerCards=new JPanel();
  viewerCards.setLayout(new CardLayout());
  internelViewerPanel=new ImagePanel();
  JPanel ivPanel=new JPanel(new BorderLayout());
  ivPanel.add(new HeaderLabel(translate("String_Node_Str")),BorderLayout.NORTH);
  ivPanel.add(internelViewerPanel,BorderLayout.CENTER);
  viewerCards.add(ivPanel,INTERNAL_VIEWER_CARD);
  ((CardLayout)viewerCards.getLayout()).show(viewerCards,FLASH_VIEWER_CARD);
  if (flashPanel != null) {
    JPanel bottomPanel=new JPanel(new BorderLayout());
    JPanel buttonsPanel=new JPanel(new FlowLayout());
    JButton selectColorButton=new JButton(View.getIcon("String_Node_Str"));
    selectColorButton.addActionListener(this);
    selectColorButton.setActionCommand(ACTION_SELECT_COLOR);
    selectColorButton.setToolTipText(AppStrings.translate("String_Node_Str"));
    buttonsPanel.add(selectColorButton);
    bottomPanel.add(buttonsPanel,BorderLayout.EAST);
    pan.add(bottomPanel,BorderLayout.SOUTH);
  }
  pan.add(leftComponent,BorderLayout.CENTER);
  viewerCards.add(pan,FLASH_VIEWER_CARD);
  previewSplitPane.setLeftComponent(viewerCards);
  parametersPanel=new JPanel(new BorderLayout());
  parametersPanel.add(paramsLabel,BorderLayout.NORTH);
  parametersPanel.add(displayWithPreview,BorderLayout.CENTER);
  previewSplitPane.setRightComponent(parametersPanel);
  parametersPanel.setVisible(false);
  displayPanel.add(previewSplitPane,CARDFLASHPANEL);
  displayPanel.add(createImagesCard(),CARDIMAGEPANEL);
  JPanel shapesCard=new JPanel(new BorderLayout());
  JPanel previewPanel=new JPanel(new BorderLayout());
  previewImagePanel=new ImagePanel();
  JPanel previewCnt=new JPanel(new BorderLayout());
  previewCnt.add(previewImagePanel,BorderLayout.CENTER);
  previewCnt.add(new PlayerControls(previewImagePanel),BorderLayout.SOUTH);
  previewPanel.add(previewCnt,BorderLayout.CENTER);
  JLabel prevIntLabel=new HeaderLabel(translate("String_Node_Str"));
  prevIntLabel.setHorizontalAlignment(SwingConstants.CENTER);
  previewPanel.add(prevIntLabel,BorderLayout.NORTH);
  shapesCard.add(previewPanel,BorderLayout.CENTER);
  displayPanel.add(shapesCard,CARDDRAWPREVIEWPANEL);
  swfPreviewPanel=new SWFPreviwPanel();
  displayPanel.add(swfPreviewPanel,CARDSWFPREVIEWPANEL);
  displayPanel.add(new JPanel(),CARDEMPTYPANEL);
  CardLayout cl=(CardLayout)(displayPanel.getLayout());
  cl.show(displayPanel,CARDEMPTYPANEL);
  searchPanel=new JPanel();
  searchPanel.setLayout(new BorderLayout());
  searchPanel.add(filterField,BorderLayout.CENTER);
  searchPanel.add(new JLabel(View.getIcon("String_Node_Str")),BorderLayout.WEST);
  JLabel closeSearchButton=new JLabel(View.getIcon("String_Node_Str"));
  closeSearchButton.addMouseListener(new MouseAdapter(){
    @Override public void mouseClicked(    MouseEvent e){
      filterField.setText("String_Node_Str");
      doFilter();
      searchPanel.setVisible(false);
    }
  }
);
  searchPanel.add(closeSearchButton,BorderLayout.EAST);
  JPanel pan1=new JPanel(new BorderLayout());
  pan1.add(new JScrollPane(tagTree),BorderLayout.CENTER);
  pan1.add(searchPanel,BorderLayout.SOUTH);
  filterField.setActionCommand(ABCPanel.ACTION_FILTER_SCRIPT);
  filterField.addActionListener(this);
  searchPanel.setVisible(false);
  filterField.getDocument().addDocumentListener(new DocumentListener(){
    @Override public void changedUpdate(    DocumentEvent e){
      warn();
    }
    @Override public void removeUpdate(    DocumentEvent e){
      warn();
    }
    @Override public void insertUpdate(    DocumentEvent e){
      warn();
    }
    public void warn(){
      doFilter();
    }
  }
);
  splitPane2=new JSplitPane(JSplitPane.VERTICAL_SPLIT,pan1,detailPanel);
  splitPane1=new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,splitPane2,displayPanel);
  welcomePanel=createWelcomePanel();
  cnt.add(welcomePanel,BorderLayout.CENTER);
  splitPane1.addPropertyChangeListener(JSplitPane.DIVIDER_LOCATION_PROPERTY,new PropertyChangeListener(){
    @Override public void propertyChange(    PropertyChangeEvent pce){
      if (splitsInited) {
        Configuration.guiSplitPane1DividerLocation.set((int)pce.getNewValue());
      }
    }
  }
);
  splitPane2.addPropertyChangeListener(JSplitPane.DIVIDER_LOCATION_PROPERTY,new PropertyChangeListener(){
    @Override public void propertyChange(    PropertyChangeEvent pce){
      if (detailPanel.isVisible()) {
        Configuration.guiSplitPane2DividerLocation.set((int)pce.getNewValue());
      }
    }
  }
);
  View.centerScreen(this);
  tagTree.addKeyListener(new KeyAdapter(){
    @Override public void keyPressed(    KeyEvent e){
      if ((e.getKeyCode() == 'F') && (e.isControlDown())) {
        searchPanel.setVisible(true);
        filterField.requestFocusInWindow();
      }
    }
  }
);
  detailPanel.setVisible(false);
  updateUi();
  enableDrop(true);
}

Fixed version (ground truth):
public MainFrame(){
  super();
  try {
    flashPanel=new FlashPlayerPanel(this);
  }
 catch (  FlashUnsupportedException fue) {
  }
  boolean externalFlashPlayerUnavailable=flashPanel == null;
  mainRibbon=new MainFrameRibbon(this,getRibbon(),externalFlashPlayerUnavailable);
  int w=Configuration.guiWindowWidth.get();
  int h=Configuration.guiWindowHeight.get();
  Dimension dim=java.awt.Toolkit.getDefaultToolkit().getScreenSize();
  if (w > dim.width) {
    w=dim.width;
  }
  if (h > dim.height) {
    h=dim.height;
  }
  setSize(w,h);
  boolean maximizedHorizontal=Configuration.guiWindowMaximizedHorizontal.get();
  boolean maximizedVertical=Configuration.guiWindowMaximizedVertical.get();
  int state=0;
  if (maximizedHorizontal) {
    state|=JFrame.MAXIMIZED_HORIZ;
  }
  if (maximizedVertical) {
    state|=JFrame.MAXIMIZED_VERT;
  }
  setExtendedState(state);
  View.setWindowIcon(this);
  addWindowStateListener(new WindowStateListener(){
    @Override public void windowStateChanged(    WindowEvent e){
      int state=e.getNewState();
      Configuration.guiWindowMaximizedHorizontal.set((state & JFrame.MAXIMIZED_HORIZ) == JFrame.MAXIMIZED_HORIZ);
      Configuration.guiWindowMaximizedVertical.set((state & JFrame.MAXIMIZED_VERT) == JFrame.MAXIMIZED_VERT);
    }
  }
);
  addComponentListener(new ComponentAdapter(){
    @Override public void componentResized(    ComponentEvent e){
      int state=getExtendedState();
      if ((state & JFrame.MAXIMIZED_HORIZ) == 0) {
        Configuration.guiWindowWidth.set(getWidth());
      }
      if ((state & JFrame.MAXIMIZED_VERT) == 0) {
        Configuration.guiWindowHeight.set(getHeight());
      }
    }
  }
);
  addWindowListener(new WindowAdapter(){
    @Override public void windowClosing(    WindowEvent e){
      if (Main.proxyFrame != null) {
        if (Main.proxyFrame.isVisible()) {
          return;
        }
      }
      if (Main.loadFromMemoryFrame != null) {
        if (Main.loadFromMemoryFrame.isVisible()) {
          return;
        }
      }
      if (Main.loadFromCacheFrame != null) {
        if (Main.loadFromCacheFrame.isVisible()) {
          return;
        }
      }
      Main.exit();
    }
  }
);
  setTitle(ApplicationInfo.applicationVerName);
  swfs=new ArrayList<>();
  java.awt.Container cnt=getContentPane();
  cnt.setLayout(new BorderLayout());
  cnt.add(getRibbon(),BorderLayout.NORTH);
  detailPanel=new JPanel();
  detailPanel.setLayout(new CardLayout());
  JPanel whitePanel=new JPanel();
  whitePanel.setBackground(Color.white);
  detailPanel.add(whitePanel,DETAILCARDEMPTYPANEL);
  CardLayout cl2=(CardLayout)(detailPanel.getLayout());
  cl2.show(detailPanel,DETAILCARDEMPTYPANEL);
  UIManager.getDefaults().put("String_Node_Str",BasicTreeUI.class.getName());
  tagTree=new JTree((TreeModel)null);
  tagTree.setRootVisible(false);
  tagTree.addTreeSelectionListener(this);
  tagTree.setBackground(Color.white);
  tagTree.setUI(new BasicTreeUI(){
    @Override public void paint(    Graphics g,    JComponent c){
      setHashColor(Color.gray);
      super.paint(g,c);
    }
  }
);
  DragSource dragSource=DragSource.getDefaultDragSource();
  dragSource.createDefaultDragGestureRecognizer(tagTree,DnDConstants.ACTION_COPY_OR_MOVE,new DragGestureListener(){
    @Override public void dragGestureRecognized(    DragGestureEvent dge){
      dge.startDrag(DragSource.DefaultCopyDrop,new Transferable(){
        @Override public DataFlavor[] getTransferDataFlavors(){
          return new DataFlavor[]{DataFlavor.javaFileListFlavor};
        }
        @Override public boolean isDataFlavorSupported(        DataFlavor flavor){
          return flavor.equals(DataFlavor.javaFileListFlavor);
        }
        @Override public Object getTransferData(        DataFlavor flavor) throws UnsupportedFlavorException, IOException {
          if (flavor.equals(DataFlavor.javaFileListFlavor)) {
            List<File> files=new ArrayList<>();
            String tempDir=System.getProperty("String_Node_Str");
            if (!tempDir.endsWith(File.separator)) {
              tempDir+=File.separator;
            }
            Random rnd=new Random();
            tempDir+="String_Node_Str" + File.separator + "String_Node_Str"+ File.separator+ System.currentTimeMillis()+ "String_Node_Str"+ rnd.nextInt(1000);
            File fTempDir=new File(tempDir);
            if (!fTempDir.exists()) {
              if (!fTempDir.mkdirs()) {
                if (!fTempDir.exists()) {
                  throw new IOException("String_Node_Str" + fTempDir);
                }
              }
            }
            final ExportDialog export=new ExportDialog();
            try {
              File ftemp=new File(tempDir);
              files=exportSelection(errorHandler,tempDir,export);
              files.clear();
              File[] fs=ftemp.listFiles();
              files.addAll(Arrays.asList(fs));
              Main.stopWork();
            }
 catch (            IOException ex) {
              return null;
            }
            for (            File f : files) {
              f.deleteOnExit();
            }
            new File(tempDir).deleteOnExit();
            return files;
          }
          return null;
        }
      }
,new DragSourceListener(){
        @Override public void dragEnter(        DragSourceDragEvent dsde){
          enableDrop(false);
        }
        @Override public void dragOver(        DragSourceDragEvent dsde){
        }
        @Override public void dropActionChanged(        DragSourceDragEvent dsde){
        }
        @Override public void dragExit(        DragSourceEvent dse){
        }
        @Override public void dragDropEnd(        DragSourceDropEvent dsde){
          enableDrop(true);
        }
      }
);
    }
  }
);
  createContextMenu();
  TreeCellRenderer tcr=new DefaultTreeCellRenderer(){
    @Override public Component getTreeCellRendererComponent(    JTree tree,    Object value,    boolean sel,    boolean expanded,    boolean leaf,    int row,    boolean hasFocus){
      super.getTreeCellRendererComponent(tree,value,sel,expanded,leaf,row,hasFocus);
      Object val=value;
      if (val instanceof TagNode) {
        val=((TagNode)val).tag;
      }
      TagType type=getTagType(val);
      if (val instanceof SWFRoot) {
        setIcon(View.getIcon("String_Node_Str"));
      }
 else       if (type != null) {
        if (type == TagType.FOLDER && expanded) {
          type=TagType.FOLDER_OPEN;
        }
        String tagTypeStr=type.toString().toLowerCase().replace("String_Node_Str","String_Node_Str");
        setIcon(View.getIcon(tagTypeStr + "String_Node_Str"));
      }
 else {
      }
      String tos=value.toString();
      int sw=getFontMetrics(getFont()).stringWidth(tos);
      setPreferredSize(new Dimension(18 + sw,getPreferredSize().height));
      setUI(new BasicLabelUI());
      setOpaque(false);
      setBackgroundNonSelectionColor(Color.white);
      return this;
    }
  }
;
  tagTree.setCellRenderer(tcr);
  statusPanel=new MainFrameStatusPanel(this);
  cnt.add(statusPanel,BorderLayout.SOUTH);
  JPanel textTopPanel=new JPanel(new BorderLayout());
  textValue=new LineMarkedEditorPane();
  textTopPanel.add(new JScrollPane(textValue),BorderLayout.CENTER);
  textValue.setEditable(false);
  JPanel textButtonsPanel=new JPanel();
  textButtonsPanel.setLayout(new FlowLayout());
  textSaveButton=new JButton(translate("String_Node_Str"),View.getIcon("String_Node_Str"));
  textSaveButton.setMargin(new Insets(3,3,3,10));
  textSaveButton.setActionCommand(ACTION_SAVE_TEXT);
  textSaveButton.addActionListener(this);
  textEditButton=new JButton(translate("String_Node_Str"),View.getIcon("String_Node_Str"));
  textEditButton.setMargin(new Insets(3,3,3,10));
  textEditButton.setActionCommand(ACTION_EDIT_TEXT);
  textEditButton.addActionListener(this);
  textCancelButton=new JButton(translate("String_Node_Str"),View.getIcon("String_Node_Str"));
  textCancelButton.setMargin(new Insets(3,3,3,10));
  textCancelButton.setActionCommand(ACTION_CANCEL_TEXT);
  textCancelButton.addActionListener(this);
  textButtonsPanel.add(textEditButton);
  textButtonsPanel.add(textSaveButton);
  textButtonsPanel.add(textCancelButton);
  textSaveButton.setVisible(false);
  textCancelButton.setVisible(false);
  textTopPanel.add(textButtonsPanel,BorderLayout.SOUTH);
  displayWithPreview=new JPanel(new CardLayout());
  displayWithPreview.add(textTopPanel,CARDTEXTPANEL);
  fontPanel=new FontPanel(this);
  displayWithPreview.add(fontPanel,CARDFONTPANEL);
  Component leftComponent;
  displayPanel=new JPanel(new CardLayout());
  if (flashPanel != null) {
    JPanel flashPlayPanel=new JPanel(new BorderLayout());
    flashPlayPanel.add(flashPanel,BorderLayout.CENTER);
    flashPlayPanel.add(flashControls=new PlayerControls(flashPanel),BorderLayout.SOUTH);
    leftComponent=flashPlayPanel;
  }
 else {
    JPanel swtPanel=new JPanel(new BorderLayout());
    swtPanel.add(new JLabel("String_Node_Str" + translate("String_Node_Str") + "String_Node_Str",JLabel.CENTER),BorderLayout.CENTER);
    swtPanel.setBackground(View.DEFAULT_BACKGROUND_COLOR);
    leftComponent=swtPanel;
  }
  textValue.setContentType("String_Node_Str");
  previewSplitPane=new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
  previewSplitPane.setDividerLocation(300);
  JPanel pan=new JPanel(new BorderLayout());
  JLabel prevLabel=new HeaderLabel(translate("String_Node_Str"));
  prevLabel.setHorizontalAlignment(SwingConstants.CENTER);
  JLabel paramsLabel=new HeaderLabel(translate("String_Node_Str"));
  paramsLabel.setHorizontalAlignment(SwingConstants.CENTER);
  pan.add(prevLabel,BorderLayout.NORTH);
  viewerCards=new JPanel();
  viewerCards.setLayout(new CardLayout());
  internelViewerPanel=new ImagePanel();
  JPanel ivPanel=new JPanel(new BorderLayout());
  ivPanel.add(new HeaderLabel(translate("String_Node_Str")),BorderLayout.NORTH);
  ivPanel.add(internelViewerPanel,BorderLayout.CENTER);
  viewerCards.add(ivPanel,INTERNAL_VIEWER_CARD);
  ((CardLayout)viewerCards.getLayout()).show(viewerCards,FLASH_VIEWER_CARD);
  if (flashPanel != null) {
    JPanel bottomPanel=new JPanel(new BorderLayout());
    JPanel buttonsPanel=new JPanel(new FlowLayout());
    JButton selectColorButton=new JButton(View.getIcon("String_Node_Str"));
    selectColorButton.addActionListener(this);
    selectColorButton.setActionCommand(ACTION_SELECT_COLOR);
    selectColorButton.setToolTipText(AppStrings.translate("String_Node_Str"));
    buttonsPanel.add(selectColorButton);
    bottomPanel.add(buttonsPanel,BorderLayout.EAST);
    pan.add(bottomPanel,BorderLayout.SOUTH);
  }
  pan.add(leftComponent,BorderLayout.CENTER);
  viewerCards.add(pan,FLASH_VIEWER_CARD);
  previewSplitPane.setLeftComponent(viewerCards);
  parametersPanel=new JPanel(new BorderLayout());
  parametersPanel.add(paramsLabel,BorderLayout.NORTH);
  parametersPanel.add(displayWithPreview,BorderLayout.CENTER);
  previewSplitPane.setRightComponent(parametersPanel);
  parametersPanel.setVisible(false);
  displayPanel.add(previewSplitPane,CARDFLASHPANEL);
  displayPanel.add(createImagesCard(),CARDIMAGEPANEL);
  JPanel shapesCard=new JPanel(new BorderLayout());
  JPanel previewPanel=new JPanel(new BorderLayout());
  previewImagePanel=new ImagePanel();
  JPanel previewCnt=new JPanel(new BorderLayout());
  previewCnt.add(previewImagePanel,BorderLayout.CENTER);
  previewCnt.add(new PlayerControls(previewImagePanel),BorderLayout.SOUTH);
  previewPanel.add(previewCnt,BorderLayout.CENTER);
  JLabel prevIntLabel=new HeaderLabel(translate("String_Node_Str"));
  prevIntLabel.setHorizontalAlignment(SwingConstants.CENTER);
  previewPanel.add(prevIntLabel,BorderLayout.NORTH);
  shapesCard.add(previewPanel,BorderLayout.CENTER);
  displayPanel.add(shapesCard,CARDDRAWPREVIEWPANEL);
  swfPreviewPanel=new SWFPreviwPanel();
  displayPanel.add(swfPreviewPanel,CARDSWFPREVIEWPANEL);
  displayPanel.add(new JPanel(),CARDEMPTYPANEL);
  CardLayout cl=(CardLayout)(displayPanel.getLayout());
  cl.show(displayPanel,CARDEMPTYPANEL);
  searchPanel=new JPanel();
  searchPanel.setLayout(new BorderLayout());
  searchPanel.add(filterField,BorderLayout.CENTER);
  searchPanel.add(new JLabel(View.getIcon("String_Node_Str")),BorderLayout.WEST);
  JLabel closeSearchButton=new JLabel(View.getIcon("String_Node_Str"));
  closeSearchButton.addMouseListener(new MouseAdapter(){
    @Override public void mouseClicked(    MouseEvent e){
      filterField.setText("String_Node_Str");
      doFilter();
      searchPanel.setVisible(false);
    }
  }
);
  searchPanel.add(closeSearchButton,BorderLayout.EAST);
  JPanel pan1=new JPanel(new BorderLayout());
  pan1.add(new JScrollPane(tagTree),BorderLayout.CENTER);
  pan1.add(searchPanel,BorderLayout.SOUTH);
  filterField.setActionCommand(ABCPanel.ACTION_FILTER_SCRIPT);
  filterField.addActionListener(this);
  searchPanel.setVisible(false);
  filterField.getDocument().addDocumentListener(new DocumentListener(){
    @Override public void changedUpdate(    DocumentEvent e){
      warn();
    }
    @Override public void removeUpdate(    DocumentEvent e){
      warn();
    }
    @Override public void insertUpdate(    DocumentEvent e){
      warn();
    }
    public void warn(){
      doFilter();
    }
  }
);
  splitPane2=new JSplitPane(JSplitPane.VERTICAL_SPLIT,pan1,detailPanel);
  splitPane1=new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,splitPane2,displayPanel);
  welcomePanel=createWelcomePanel();
  cnt.add(welcomePanel,BorderLayout.CENTER);
  splitPane1.addPropertyChangeListener(JSplitPane.DIVIDER_LOCATION_PROPERTY,new PropertyChangeListener(){
    @Override public void propertyChange(    PropertyChangeEvent pce){
      if (splitsInited) {
        Configuration.guiSplitPane1DividerLocation.set((int)pce.getNewValue());
      }
    }
  }
);
  splitPane2.addPropertyChangeListener(JSplitPane.DIVIDER_LOCATION_PROPERTY,new PropertyChangeListener(){
    @Override public void propertyChange(    PropertyChangeEvent pce){
      if (detailPanel.isVisible()) {
        Configuration.guiSplitPane2DividerLocation.set((int)pce.getNewValue());
      }
    }
  }
);
  CardLayout cl3=new CardLayout();
  contentPanel=new JPanel(cl3);
  contentPanel.add(welcomePanel,WELCOME_PANEL);
  contentPanel.add(splitPane1,SPLIT_PANE1);
  cnt.add(contentPanel);
  cl3.show(contentPanel,WELCOME_PANEL);
  View.centerScreen(this);
  tagTree.addKeyListener(new KeyAdapter(){
    @Override public void keyPressed(    KeyEvent e){
      if ((e.getKeyCode() == 'F') && (e.isControlDown())) {
        searchPanel.setVisible(true);
        filterField.requestFocusInWindow();
      }
    }
  }
);
  detailPanel.setVisible(false);
  updateUi();
  enableDrop(true);
}