Program: 11159
Project: 11159
Buggy source:
public Application(){
  if (!GDALUtil.isProjectionsSupported()) {
    String message="String_Node_Str" + "String_Node_Str" + GDALUtil.GCS_FILE + "String_Node_Str"+ "String_Node_Str";
    int value=JOptionPane.showConfirmDialog(null,message,"String_Node_Str",JOptionPane.YES_NO_OPTION,JOptionPane.WARNING_MESSAGE);
    if (value != JOptionPane.YES_OPTION) {
      return;
    }
  }
  JLabel label;
  GridBagConstraints c;
  JScrollPane scrollPane;
  ButtonGroup bg;
  JPanel panel;
  Dimension size;
  ActionListener al;
  JSeparator sep;
  int SPACING=4;
  frame=new JFrame("String_Node_Str");
  frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
  frame.setLayout(new BorderLayout());
  frame.addWindowListener(new WindowAdapter(){
    @Override public void windowClosed(    WindowEvent we){
      onExit();
    }
  }
);
  JPanel tlPanel=new JPanel(new GridBagLayout());
  tlPanel.setBorder(BorderFactory.createTitledBorder("String_Node_Str"));
  JPanel trPanel=new JPanel(new GridBagLayout());
  trPanel.setBorder(BorderFactory.createTitledBorder("String_Node_Str"));
  JPanel blPanel=new JPanel(new GridBagLayout());
  blPanel.setBorder(BorderFactory.createTitledBorder("String_Node_Str"));
  JPanel brPanel=new JPanel(new GridBagLayout());
  brPanel.setBorder(BorderFactory.createTitledBorder("String_Node_Str"));
  JPanel bPanel=new JPanel(new GridBagLayout());
  leftSplit=new JSplitPane(JSplitPane.VERTICAL_SPLIT,true,tlPanel,blPanel);
  rightSplit=new JSplitPane(JSplitPane.VERTICAL_SPLIT,true,trPanel,brPanel);
  topSplit=new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,true,leftSplit,rightSplit);
  logSplit=new JSplitPane(JSplitPane.VERTICAL_SPLIT,true,topSplit,bPanel);
  panel=new JPanel(new GridBagLayout());
  scrollPane=new JScrollPane(panel,JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
  c=new GridBagConstraints();
  c.fill=GridBagConstraints.BOTH;
  c.weightx=1;
  c.weighty=1;
  trPanel.add(scrollPane,c);
  trPanel=panel;
  frame.add(logSplit,BorderLayout.CENTER);
  textLog=new JTextPane();
  textLog.setEditable(false);
  scrollPane=new JScrollPane(textLog,JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
  c=new GridBagConstraints();
  c.gridx=0;
  c.gridy=0;
  c.fill=GridBagConstraints.BOTH;
  c.weightx=1;
  c.weighty=1;
  bPanel.add(scrollPane,c);
  textLog.getDocument().addDocumentListener(new DocumentAdapter(){
    @Override public void anyChange(    DocumentEvent e){
      int length=textLog.getDocument().getLength();
      textLog.select(length,length);
    }
  }
);
  progress=new JProgressBar(0,100);
  progress.setString("String_Node_Str");
  progress.setStringPainted(true);
  c=new GridBagConstraints();
  c.gridx=0;
  c.gridy=1;
  c.fill=GridBagConstraints.HORIZONTAL;
  bPanel.add(progress,c);
  logger=new DocumentLogger(LOGGER,textLog.getStyledDocument());
  LogManager.getLogManager().addLogger(logger);
  createLoggerPopupMenu();
  panel=new JPanel(new GridBagLayout());
  c=new GridBagConstraints();
  c.gridy=0;
  c.anchor=GridBagConstraints.WEST;
  tlPanel.add(panel,c);
  label=new JLabel("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=0;
  c.insets=new Insets(0,0,0,SPACING);
  panel.add(label,c);
  al=new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      datasetModeChanged();
    }
  }
;
  gdalRadio=new JRadioButton("String_Node_Str");
  gdalRadio.setSelected(true);
  datasetSelected=gdalRadio;
  c=new GridBagConstraints();
  c.gridx=1;
  panel.add(gdalRadio,c);
  gdalRadio.addActionListener(al);
  mapnikRadio=new JRadioButton("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=2;
  panel.add(mapnikRadio,c);
  mapnikRadio.addActionListener(al);
  bg=new ButtonGroup();
  bg.add(gdalRadio);
  bg.add(mapnikRadio);
  sep=new JSeparator(JSeparator.HORIZONTAL);
  c=new GridBagConstraints();
  c.gridy=1;
  c.fill=GridBagConstraints.HORIZONTAL;
  c.insets=new Insets(SPACING * 2,0,SPACING * 2,0);
  tlPanel.add(sep,c);
  dataModeCards=new JPanel(new CardLayout());
  c=new GridBagConstraints();
  c.gridy=2;
  c.fill=GridBagConstraints.BOTH;
  c.weighty=1;
  c.weightx=1;
  c.anchor=GridBagConstraints.NORTH;
  tlPanel.add(dataModeCards,c);
  JPanel gdalCard=new JPanel(new GridBagLayout());
  dataModeCards.add(gdalCard,gdalRadio.getText());
  JPanel mapnikCard=new JPanel(new GridBagLayout());
  dataModeCards.add(mapnikCard,mapnikRadio.getText());
  panel=new JPanel(new GridBagLayout());
  c=new GridBagConstraints();
  c.gridy=0;
  c.fill=GridBagConstraints.HORIZONTAL;
  gdalCard.add(panel,c);
  label=new JLabel("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=0;
  c.insets=new Insets(0,0,SPACING,SPACING);
  panel.add(label,c);
  gdalFileField=new JTextField();
  gdalFileField.setEnabled(false);
  c=new GridBagConstraints();
  c.gridx=1;
  c.fill=GridBagConstraints.HORIZONTAL;
  c.weightx=1;
  c.insets=new Insets(0,0,SPACING,0);
  panel.add(gdalFileField,c);
  browseGdalButton=new JButton("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=2;
  c.insets=new Insets(0,0,SPACING,0);
  panel.add(browseGdalButton,c);
  browseGdalButton.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      setupInputFile();
    }
  }
);
  infoText=new JTextArea();
  infoText.setBackground(label.getBackground());
  infoText.setEditable(false);
  Font font=Font.decode(null);
  infoText.setFont(font);
  scrollPane=new JScrollPane(infoText,JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
  size=new Dimension(20,20);
  scrollPane.setMinimumSize(size);
  scrollPane.setPreferredSize(size);
  c=new GridBagConstraints();
  c.gridy=1;
  c.fill=GridBagConstraints.BOTH;
  c.weightx=1;
  c.weighty=1;
  gdalCard.add(scrollPane,c);
  panel=new JPanel(new GridBagLayout());
  c=new GridBagConstraints();
  c.gridy=0;
  c.fill=GridBagConstraints.HORIZONTAL;
  mapnikCard.add(panel,c);
  label=new JLabel("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=0;
  c.gridy=0;
  c.anchor=GridBagConstraints.EAST;
  c.insets=new Insets(0,0,SPACING,SPACING);
  panel.add(label,c);
  pythonBinaryField=new JTextField();
  pythonBinaryField.setEnabled(false);
  c=new GridBagConstraints();
  c.gridx=1;
  c.gridy=0;
  c.fill=GridBagConstraints.HORIZONTAL;
  c.weightx=1;
  c.insets=new Insets(0,0,SPACING,0);
  panel.add(pythonBinaryField,c);
  browsePythonBinaryButton=new JButton("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=2;
  c.gridy=0;
  c.insets=new Insets(0,0,SPACING,0);
  panel.add(browsePythonBinaryButton,c);
  browsePythonBinaryButton.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      setupPythonBinary();
    }
  }
);
  label=new JLabel("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=0;
  c.gridy=1;
  c.anchor=GridBagConstraints.EAST;
  c.insets=new Insets(0,0,SPACING,SPACING);
  panel.add(label,c);
  mapnikScriptField=new JTextField();
  mapnikScriptField.setEnabled(false);
  c=new GridBagConstraints();
  c.gridx=1;
  c.gridy=1;
  c.fill=GridBagConstraints.HORIZONTAL;
  c.weightx=1;
  c.insets=new Insets(0,0,SPACING,0);
  panel.add(mapnikScriptField,c);
  browseMapnikScriptButton=new JButton("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=2;
  c.gridy=1;
  c.insets=new Insets(0,0,SPACING,0);
  panel.add(browseMapnikScriptButton,c);
  browseMapnikScriptButton.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      setupMapnikScript();
    }
  }
);
  label=new JLabel("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=0;
  c.gridy=2;
  c.anchor=GridBagConstraints.EAST;
  c.insets=new Insets(0,0,0,SPACING);
  panel.add(label,c);
  mapnikFileField=new JTextField();
  mapnikFileField.setEnabled(false);
  c=new GridBagConstraints();
  c.gridx=1;
  c.gridy=2;
  c.fill=GridBagConstraints.HORIZONTAL;
  c.weightx=1;
  panel.add(mapnikFileField,c);
  browseMapnikButton=new JButton("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=2;
  c.gridy=2;
  panel.add(browseMapnikButton,c);
  browseMapnikButton.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      setupInputFile();
    }
  }
);
  sep=new JSeparator(JSeparator.HORIZONTAL);
  c=new GridBagConstraints();
  c.gridy=1;
  c.fill=GridBagConstraints.HORIZONTAL;
  c.insets=new Insets(SPACING * 2,0,SPACING * 2,0);
  mapnikCard.add(sep,c);
  panel=new JPanel(new GridBagLayout());
  c=new GridBagConstraints();
  c.gridy=2;
  c.anchor=GridBagConstraints.NORTH;
  c.fill=GridBagConstraints.HORIZONTAL;
  c.weightx=1;
  c.weighty=1;
  mapnikCard.add(panel,c);
  label=new JLabel("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=0;
  c.gridy=0;
  c.anchor=GridBagConstraints.EAST;
  c.insets=new Insets(0,0,SPACING,SPACING);
  panel.add(label,c);
  labels.add(label);
  minLatitudeField=new JDoubleField(-90d);
  c=new GridBagConstraints();
  c.gridx=1;
  c.gridy=0;
  c.weightx=0.5;
  c.fill=GridBagConstraints.HORIZONTAL;
  c.insets=new Insets(0,0,SPACING,SPACING);
  panel.add(minLatitudeField,c);
  label=new JLabel("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=2;
  c.gridy=0;
  c.anchor=GridBagConstraints.EAST;
  c.insets=new Insets(0,SPACING,SPACING,SPACING);
  panel.add(label,c);
  labels.add(label);
  minLongitudeField=new JDoubleField(-180d);
  c=new GridBagConstraints();
  c.gridx=3;
  c.gridy=0;
  c.weightx=0.5;
  c.fill=GridBagConstraints.HORIZONTAL;
  c.insets=new Insets(0,0,SPACING,0);
  panel.add(minLongitudeField,c);
  label=new JLabel("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=0;
  c.gridy=1;
  c.anchor=GridBagConstraints.EAST;
  c.insets=new Insets(0,0,SPACING,SPACING);
  panel.add(label,c);
  labels.add(label);
  maxLatitudeField=new JDoubleField(90d);
  c=new GridBagConstraints();
  c.gridx=1;
  c.gridy=1;
  c.fill=GridBagConstraints.HORIZONTAL;
  c.insets=new Insets(0,0,SPACING,SPACING);
  panel.add(maxLatitudeField,c);
  label=new JLabel("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=2;
  c.gridy=1;
  c.anchor=GridBagConstraints.EAST;
  c.insets=new Insets(0,SPACING,SPACING,SPACING);
  panel.add(label,c);
  labels.add(label);
  maxLongitudeField=new JDoubleField(180d);
  c=new GridBagConstraints();
  c.gridx=3;
  c.gridy=1;
  c.fill=GridBagConstraints.HORIZONTAL;
  c.insets=new Insets(0,0,SPACING,0);
  panel.add(maxLongitudeField,c);
  previewCanvas=new JLabel();
  previewCanvas.setHorizontalAlignment(SwingConstants.CENTER);
  scrollPane=new JScrollPane(previewCanvas,JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
  previewCanvas.setBackground(Color.white);
  c=new GridBagConstraints();
  c.weightx=1;
  c.weighty=1;
  c.fill=GridBagConstraints.BOTH;
  c.anchor=GridBagConstraints.CENTER;
  blPanel.add(scrollPane,c);
  tileTypeLabel=new JLabel("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=0;
  c.gridy=0;
  c.anchor=GridBagConstraints.EAST;
  c.insets=new Insets(0,0,SPACING,SPACING);
  trPanel.add(tileTypeLabel,c);
  panel=new JPanel(new GridBagLayout());
  c=new GridBagConstraints();
  c.gridx=1;
  c.gridy=0;
  c.weightx=1;
  c.anchor=GridBagConstraints.WEST;
  c.insets=new Insets(0,0,SPACING,0);
  trPanel.add(panel,c);
  al=new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      tileTypeChanged();
    }
  }
;
  imageRadio=new JRadioButton("String_Node_Str");
  imageRadio.setSelected(true);
  c=new GridBagConstraints();
  c.gridx=0;
  panel.add(imageRadio,c);
  imageRadio.addActionListener(al);
  elevationRadio=new JRadioButton("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=1;
  panel.add(elevationRadio,c);
  elevationRadio.addActionListener(al);
  bg=new ButtonGroup();
  bg.add(imageRadio);
  bg.add(elevationRadio);
  label=new JLabel("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=0;
  c.gridy=1;
  c.anchor=GridBagConstraints.EAST;
  c.insets=new Insets(0,0,SPACING,SPACING);
  trPanel.add(label,c);
  labels.add(label);
  panel=new JPanel(new GridBagLayout());
  c=new GridBagConstraints();
  c.gridx=1;
  c.gridy=1;
  c.anchor=GridBagConstraints.WEST;
  c.insets=new Insets(0,0,SPACING,0);
  trPanel.add(panel,c);
  tilesizeField=new JIntegerField(512);
  tilesizeField.setPositive(true);
  c=new GridBagConstraints();
  c.gridx=0;
  size=tilesizeField.getPreferredSize();
  size.width=50;
  tilesizeField.setMinimumSize(size);
  tilesizeField.setMaximumSize(size);
  tilesizeField.setPreferredSize(size);
  panel.add(tilesizeField,c);
  tilesizeField.getDocument().addDocumentListener(new DocumentAdapter(){
    @Override public void anyChange(    DocumentEvent e){
      if (!tilesizeBeingSet) {
        tilesizeChanged=true;
      }
    }
  }
);
  tilesizeField.addFocusListener(new FocusAdapter(){
    @Override public void focusLost(    FocusEvent e){
      tilesizeChanged();
    }
  }
);
  label=new JLabel("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=1;
  c.insets=new Insets(0,SPACING / 2,0,0);
  panel.add(label,c);
  labels.add(label);
  label=new JLabel("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=0;
  c.gridy=2;
  c.anchor=GridBagConstraints.EAST;
  c.insets=new Insets(0,0,SPACING,SPACING);
  trPanel.add(label,c);
  labels.add(label);
  panel=new JPanel(new GridBagLayout());
  c=new GridBagConstraints();
  c.gridx=1;
  c.gridy=2;
  c.anchor=GridBagConstraints.WEST;
  c.insets=new Insets(0,0,SPACING,0);
  trPanel.add(panel,c);
  lztsField=new JDoubleField(36d);
  c=new GridBagConstraints();
  c.gridx=0;
  size=lztsField.getPreferredSize();
  size.width=50;
  lztsField.setMinimumSize(size);
  lztsField.setMaximumSize(size);
  lztsField.setPreferredSize(size);
  panel.add(lztsField,c);
  lztsField.getDocument().addDocumentListener(new DocumentAdapter(){
    @Override public void anyChange(    DocumentEvent e){
      if (!lztsBeingSet) {
        lztsChanged=true;
      }
    }
  }
);
  label=new JLabel("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=1;
  c.insets=new Insets(0,SPACING / 2,0,0);
  panel.add(label,c);
  labels.add(label);
  levelsLabel=new JLabel("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=0;
  c.gridy=3;
  c.anchor=GridBagConstraints.EAST;
  c.insets=new Insets(0,0,SPACING,SPACING);
  trPanel.add(levelsLabel,c);
  levelsSpinner=new JSpinner(new SpinnerNumberModel(5,1,100,1));
  c=new GridBagConstraints();
  c.gridx=1;
  c.gridy=3;
  c.anchor=GridBagConstraints.WEST;
  c.insets=new Insets(0,0,SPACING,0);
  trPanel.add(levelsSpinner,c);
  imageFormatLabel=new JLabel("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=0;
  c.gridy=4;
  c.anchor=GridBagConstraints.EAST;
  c.insets=new Insets(0,0,SPACING,SPACING);
  trPanel.add(imageFormatLabel,c);
  panel=new JPanel(new GridBagLayout());
  c=new GridBagConstraints();
  c.gridx=1;
  c.gridy=4;
  c.anchor=GridBagConstraints.WEST;
  c.insets=new Insets(0,0,SPACING,0);
  trPanel.add(panel,c);
  al=new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      imageFormatChanged();
    }
  }
;
  jpegRadio=new JRadioButton("String_Node_Str");
  jpegRadio.setSelected(true);
  c=new GridBagConstraints();
  c.gridx=0;
  panel.add(jpegRadio,c);
  jpegRadio.addActionListener(al);
  pngRadio=new JRadioButton("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=1;
  panel.add(pngRadio,c);
  pngRadio.addActionListener(al);
  bg=new ButtonGroup();
  bg.add(jpegRadio);
  bg.add(pngRadio);
  alphaCheck=new JCheckBox("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=0;
  c.gridy=5;
  c.anchor=GridBagConstraints.WEST;
  c.gridwidth=2;
  c.insets=new Insets(0,0,SPACING,0);
  trPanel.add(alphaCheck,c);
  alphaCheck.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      alphaSet=alphaCheck.isSelected();
      bandCountChanged();
    }
  }
);
  cellTypeLabel=new JLabel("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=0;
  c.gridy=6;
  c.anchor=GridBagConstraints.EAST;
  c.insets=new Insets(0,0,SPACING,SPACING);
  trPanel.add(cellTypeLabel,c);
  panel=new JPanel(new GridBagLayout());
  c=new GridBagConstraints();
  c.gridx=1;
  c.gridy=6;
  c.anchor=GridBagConstraints.WEST;
  c.insets=new Insets(0,0,SPACING,0);
  trPanel.add(panel,c);
  al=new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      elevationFormatChanged();
    }
  }
;
  byteRadio=new JRadioButton("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=0;
  panel.add(byteRadio,c);
  byteRadio.addActionListener(al);
  int16Radio=new JRadioButton("String_Node_Str");
  int16Radio.setSelected(true);
  c=new GridBagConstraints();
  c.gridx=1;
  panel.add(int16Radio,c);
  int16Radio.addActionListener(al);
  int32Radio=new JRadioButton("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=2;
  panel.add(int32Radio,c);
  int32Radio.addActionListener(al);
  float32Radio=new JRadioButton("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=3;
  panel.add(float32Radio,c);
  float32Radio.addActionListener(al);
  bg=new ButtonGroup();
  bg.add(byteRadio);
  bg.add(int16Radio);
  bg.add(int32Radio);
  bg.add(float32Radio);
  bandLabel=new JLabel("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=0;
  c.gridy=7;
  c.anchor=GridBagConstraints.EAST;
  c.insets=new Insets(0,0,SPACING,SPACING);
  trPanel.add(bandLabel,c);
  panel=new JPanel(new GridBagLayout());
  c=new GridBagConstraints();
  c.gridx=1;
  c.gridy=7;
  c.anchor=GridBagConstraints.WEST;
  c.insets=new Insets(0,0,SPACING,0);
  trPanel.add(panel,c);
  bandCombo=new JComboBox(new Integer[]{1});
  bandCombo.setSelectedIndex(0);
  c=new GridBagConstraints();
  c.gridx=0;
  panel.add(bandCombo,c);
  overviewsCheck=new JCheckBox("String_Node_Str");
  overviewsCheck.setSelected(true);
  c=new GridBagConstraints();
  c.gridx=0;
  c.gridy=8;
  c.gridwidth=2;
  c.anchor=GridBagConstraints.WEST;
  c.insets=new Insets(0,0,SPACING,0);
  trPanel.add(overviewsCheck,c);
  panel=new JPanel(new GridBagLayout());
  c=new GridBagConstraints();
  c.gridx=0;
  c.gridy=9;
  c.gridwidth=2;
  c.anchor=GridBagConstraints.WEST;
  trPanel.add(panel,c);
  overrideLevelsCheck=new JCheckBox("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=0;
  c.insets=new Insets(0,0,SPACING,SPACING);
  panel.add(overrideLevelsCheck,c);
  overrideLevelsCheck.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      if (mapnikRadio.isSelected() && !overrideLevelsCheck.isSelected()) {
        overrideLevelsCheck.setSelected(true);
      }
      enableFields();
    }
  }
);
  overrideLevelsSpinner=new JSpinner(new SpinnerNumberModel(1,1,100,1));
  c=new GridBagConstraints();
  c.gridx=1;
  c.insets=new Insets(0,0,SPACING,0);
  panel.add(overrideLevelsSpinner,c);
  outsideCheck=new JCheckBox("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=0;
  c.gridy=10;
  c.gridwidth=2;
  c.anchor=GridBagConstraints.WEST;
  trPanel.add(outsideCheck,c);
  outsideCheck.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      enableFields();
    }
  }
);
  outsidePanel=new JPanel(new GridBagLayout());
  c=new GridBagConstraints();
  c.gridx=1;
  c.gridy=11;
  c.anchor=GridBagConstraints.WEST;
  c.insets=new Insets(0,0,SPACING,0);
  trPanel.add(outsidePanel,c);
  replaceCheck=new JCheckBox("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=0;
  c.gridy=12;
  c.gridwidth=2;
  c.anchor=GridBagConstraints.WEST;
  trPanel.add(replaceCheck,c);
  replaceCheck.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      enableFields();
    }
  }
);
  replace1Label=new JLabel("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=0;
  c.gridy=13;
  c.anchor=GridBagConstraints.EAST;
  c.insets=new Insets(0,0,SPACING,SPACING);
  trPanel.add(replace1Label,c);
  minPanel=new JPanel(new GridBagLayout());
  c=new GridBagConstraints();
  c.gridx=1;
  c.gridy=13;
  c.anchor=GridBagConstraints.WEST;
  c.insets=new Insets(0,0,SPACING,0);
  trPanel.add(minPanel,c);
  replace2Label=new JLabel("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=0;
  c.gridy=14;
  c.anchor=GridBagConstraints.EAST;
  c.insets=new Insets(0,0,SPACING,SPACING);
  trPanel.add(replace2Label,c);
  maxPanel=new JPanel(new GridBagLayout());
  c=new GridBagConstraints();
  c.gridx=1;
  c.gridy=14;
  c.anchor=GridBagConstraints.WEST;
  c.insets=new Insets(0,0,SPACING,0);
  trPanel.add(maxPanel,c);
  replace3Label=new JLabel("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=0;
  c.gridy=15;
  c.anchor=GridBagConstraints.EAST;
  c.insets=new Insets(0,0,SPACING,SPACING);
  trPanel.add(replace3Label,c);
  min2Panel=new JPanel(new GridBagLayout());
  c=new GridBagConstraints();
  c.gridx=1;
  c.gridy=15;
  c.anchor=GridBagConstraints.WEST;
  c.insets=new Insets(0,0,SPACING,0);
  trPanel.add(min2Panel,c);
  replace4Label=new JLabel("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=0;
  c.gridy=16;
  c.anchor=GridBagConstraints.EAST;
  c.insets=new Insets(0,0,SPACING,SPACING);
  trPanel.add(replace4Label,c);
  max2Panel=new JPanel(new GridBagLayout());
  c=new GridBagConstraints();
  c.gridx=1;
  c.gridy=16;
  c.anchor=GridBagConstraints.WEST;
  c.insets=new Insets(0,0,SPACING,0);
  trPanel.add(max2Panel,c);
  replace5Label=new JLabel("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=0;
  c.gridy=17;
  c.anchor=GridBagConstraints.EAST;
  c.insets=new Insets(0,0,SPACING,SPACING);
  trPanel.add(replace5Label,c);
  withPanel=new JPanel(new GridBagLayout());
  c=new GridBagConstraints();
  c.gridx=1;
  c.gridy=17;
  c.anchor=GridBagConstraints.WEST;
  c.insets=new Insets(0,0,SPACING,0);
  trPanel.add(withPanel,c);
  replace6Label=new JLabel("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=0;
  c.gridy=18;
  c.anchor=GridBagConstraints.EAST;
  c.insets=new Insets(0,0,SPACING,SPACING);
  trPanel.add(replace6Label,c);
  otherwisePanel=new JPanel(new GridBagLayout());
  c=new GridBagConstraints();
  c.gridx=1;
  c.gridy=18;
  c.anchor=GridBagConstraints.WEST;
  c.insets=new Insets(0,0,SPACING,0);
  trPanel.add(otherwisePanel,c);
  panel=new JPanel(new GridBagLayout());
  c=new GridBagConstraints();
  c.gridx=0;
  c.gridy=19;
  c.weighty=1;
  trPanel.add(panel,c);
  panel=new JPanel(new GridBagLayout());
  c=new GridBagConstraints();
  c.gridx=0;
  c.gridy=0;
  c.fill=GridBagConstraints.HORIZONTAL;
  brPanel.add(panel,c);
  label=new JLabel("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=0;
  c.insets=new Insets(0,0,SPACING,SPACING);
  panel.add(label,c);
  outputDirectory=new JTextField();
  c=new GridBagConstraints();
  c.gridx=1;
  c.fill=GridBagConstraints.HORIZONTAL;
  c.weightx=1;
  c.insets=new Insets(0,0,SPACING,0);
  panel.add(outputDirectory,c);
  outputDirectory.getDocument().addDocumentListener(new DocumentAdapter(){
    @Override public void anyChange(    DocumentEvent e){
      String text=outputDirectory.getText();
      File dir=new File(text);
      if (dir.isDirectory()) {
        preferences.put(OUTPUT_DIR_KEY,text);
      }
    }
  }
);
  outputButton=new JButton("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=2;
  c.insets=new Insets(0,0,SPACING,0);
  panel.add(outputButton,c);
  outputButton.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      JFileChooser chooser=new JFileChooser(preferences.get(OUTPUT_DIR_KEY,null));
      chooser.setAcceptAllFileFilterUsed(false);
      chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
      if (chooser.showOpenDialog(frame) == JFileChooser.APPROVE_OPTION) {
        File dir=chooser.getSelectedFile();
        outputDirectory.setText(dir.getAbsolutePath());
        preferences.put(OUTPUT_DIR_KEY,dir.getAbsolutePath());
      }
    }
  }
);
  tileText=new JTextArea();
  tileText.setBackground(label.getBackground());
  tileText.setEditable(false);
  tileText.setFont(font);
  scrollPane=new JScrollPane(tileText,JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
  size=new Dimension(20,20);
  scrollPane.setMinimumSize(size);
  scrollPane.setPreferredSize(size);
  c=new GridBagConstraints();
  c.gridx=0;
  c.gridy=1;
  c.fill=GridBagConstraints.BOTH;
  c.weighty=1;
  c.weightx=1;
  c.anchor=GridBagConstraints.NORTH;
  c.insets=new Insets(0,0,SPACING,0);
  brPanel.add(scrollPane,c);
  panel=new JPanel(new GridBagLayout());
  c=new GridBagConstraints();
  c.gridx=0;
  c.gridy=2;
  brPanel.add(panel,c);
  tileButton=new JButton("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=0;
  c.insets=new Insets(0,0,0,SPACING);
  panel.add(tileButton,c);
  tileButton.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      generateTiles();
    }
  }
);
  cancelButton=new JButton("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=1;
  panel.add(cancelButton,c);
  cancelButton.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      cancel();
    }
  }
);
  JButton previewButton=new JButton("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=2;
  panel.add(previewButton,c);
  previewButton.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      preview();
    }
  }
);
  updatePythonFields();
  addRecalculateListeners();
  openDataset(null);
  datasetModeChanged();
  logger.info("String_Node_Str");
  if (!GDALUtil.isProjectionsSupported()) {
    logger.warning("String_Node_Str");
  }
  loadFrameBounds();
  loadSplitLocations();
  frame.setVisible(true);
}

Fixed version (ground truth):
public Application(){
  if (!GDALUtil.isProjectionsSupported()) {
    String message="String_Node_Str" + "String_Node_Str" + GDALUtil.GCS_FILE + "String_Node_Str"+ "String_Node_Str";
    int value=JOptionPane.showConfirmDialog(null,message,"String_Node_Str",JOptionPane.YES_NO_OPTION,JOptionPane.WARNING_MESSAGE);
    if (value != JOptionPane.YES_OPTION) {
      return;
    }
  }
  Thread.setDefaultUncaughtExceptionHandler(this);
  JLabel label;
  GridBagConstraints c;
  JScrollPane scrollPane;
  ButtonGroup bg;
  JPanel panel;
  Dimension size;
  ActionListener al;
  JSeparator sep;
  int SPACING=4;
  frame=new JFrame("String_Node_Str");
  frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
  frame.setLayout(new BorderLayout());
  frame.addWindowListener(new WindowAdapter(){
    @Override public void windowClosed(    WindowEvent we){
      onExit();
    }
  }
);
  JPanel tlPanel=new JPanel(new GridBagLayout());
  tlPanel.setBorder(BorderFactory.createTitledBorder("String_Node_Str"));
  JPanel trPanel=new JPanel(new GridBagLayout());
  trPanel.setBorder(BorderFactory.createTitledBorder("String_Node_Str"));
  JPanel blPanel=new JPanel(new GridBagLayout());
  blPanel.setBorder(BorderFactory.createTitledBorder("String_Node_Str"));
  JPanel brPanel=new JPanel(new GridBagLayout());
  brPanel.setBorder(BorderFactory.createTitledBorder("String_Node_Str"));
  JPanel bPanel=new JPanel(new GridBagLayout());
  leftSplit=new JSplitPane(JSplitPane.VERTICAL_SPLIT,true,tlPanel,blPanel);
  rightSplit=new JSplitPane(JSplitPane.VERTICAL_SPLIT,true,trPanel,brPanel);
  topSplit=new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,true,leftSplit,rightSplit);
  logSplit=new JSplitPane(JSplitPane.VERTICAL_SPLIT,true,topSplit,bPanel);
  panel=new JPanel(new GridBagLayout());
  scrollPane=new JScrollPane(panel,JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
  c=new GridBagConstraints();
  c.fill=GridBagConstraints.BOTH;
  c.weightx=1;
  c.weighty=1;
  trPanel.add(scrollPane,c);
  trPanel=panel;
  frame.add(logSplit,BorderLayout.CENTER);
  textLog=new JTextPane();
  textLog.setEditable(false);
  scrollPane=new JScrollPane(textLog,JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
  c=new GridBagConstraints();
  c.gridx=0;
  c.gridy=0;
  c.fill=GridBagConstraints.BOTH;
  c.weightx=1;
  c.weighty=1;
  bPanel.add(scrollPane,c);
  textLog.getDocument().addDocumentListener(new DocumentAdapter(){
    @Override public void anyChange(    DocumentEvent e){
      int length=textLog.getDocument().getLength();
      textLog.select(length,length);
    }
  }
);
  progress=new JProgressBar(0,100);
  progress.setString("String_Node_Str");
  progress.setStringPainted(true);
  c=new GridBagConstraints();
  c.gridx=0;
  c.gridy=1;
  c.fill=GridBagConstraints.HORIZONTAL;
  bPanel.add(progress,c);
  logger=new DocumentLogger(LOGGER,textLog.getStyledDocument());
  LogManager.getLogManager().addLogger(logger);
  createLoggerPopupMenu();
  panel=new JPanel(new GridBagLayout());
  c=new GridBagConstraints();
  c.gridy=0;
  c.anchor=GridBagConstraints.WEST;
  tlPanel.add(panel,c);
  label=new JLabel("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=0;
  c.insets=new Insets(0,0,0,SPACING);
  panel.add(label,c);
  al=new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      datasetModeChanged();
    }
  }
;
  gdalRadio=new JRadioButton("String_Node_Str");
  gdalRadio.setSelected(true);
  datasetSelected=gdalRadio;
  c=new GridBagConstraints();
  c.gridx=1;
  panel.add(gdalRadio,c);
  gdalRadio.addActionListener(al);
  mapnikRadio=new JRadioButton("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=2;
  panel.add(mapnikRadio,c);
  mapnikRadio.addActionListener(al);
  bg=new ButtonGroup();
  bg.add(gdalRadio);
  bg.add(mapnikRadio);
  sep=new JSeparator(JSeparator.HORIZONTAL);
  c=new GridBagConstraints();
  c.gridy=1;
  c.fill=GridBagConstraints.HORIZONTAL;
  c.insets=new Insets(SPACING * 2,0,SPACING * 2,0);
  tlPanel.add(sep,c);
  dataModeCards=new JPanel(new CardLayout());
  c=new GridBagConstraints();
  c.gridy=2;
  c.fill=GridBagConstraints.BOTH;
  c.weighty=1;
  c.weightx=1;
  c.anchor=GridBagConstraints.NORTH;
  tlPanel.add(dataModeCards,c);
  JPanel gdalCard=new JPanel(new GridBagLayout());
  dataModeCards.add(gdalCard,gdalRadio.getText());
  JPanel mapnikCard=new JPanel(new GridBagLayout());
  dataModeCards.add(mapnikCard,mapnikRadio.getText());
  panel=new JPanel(new GridBagLayout());
  c=new GridBagConstraints();
  c.gridy=0;
  c.fill=GridBagConstraints.HORIZONTAL;
  gdalCard.add(panel,c);
  label=new JLabel("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=0;
  c.insets=new Insets(0,0,SPACING,SPACING);
  panel.add(label,c);
  gdalFileField=new JTextField();
  gdalFileField.setEnabled(false);
  c=new GridBagConstraints();
  c.gridx=1;
  c.fill=GridBagConstraints.HORIZONTAL;
  c.weightx=1;
  c.insets=new Insets(0,0,SPACING,0);
  panel.add(gdalFileField,c);
  browseGdalButton=new JButton("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=2;
  c.insets=new Insets(0,0,SPACING,0);
  panel.add(browseGdalButton,c);
  browseGdalButton.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      setupInputFile();
    }
  }
);
  infoText=new JTextArea();
  infoText.setBackground(label.getBackground());
  infoText.setEditable(false);
  Font font=Font.decode(null);
  infoText.setFont(font);
  scrollPane=new JScrollPane(infoText,JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
  size=new Dimension(20,20);
  scrollPane.setMinimumSize(size);
  scrollPane.setPreferredSize(size);
  c=new GridBagConstraints();
  c.gridy=1;
  c.fill=GridBagConstraints.BOTH;
  c.weightx=1;
  c.weighty=1;
  gdalCard.add(scrollPane,c);
  panel=new JPanel(new GridBagLayout());
  c=new GridBagConstraints();
  c.gridy=0;
  c.fill=GridBagConstraints.HORIZONTAL;
  mapnikCard.add(panel,c);
  label=new JLabel("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=0;
  c.gridy=0;
  c.anchor=GridBagConstraints.EAST;
  c.insets=new Insets(0,0,SPACING,SPACING);
  panel.add(label,c);
  pythonBinaryField=new JTextField();
  pythonBinaryField.setEnabled(false);
  c=new GridBagConstraints();
  c.gridx=1;
  c.gridy=0;
  c.fill=GridBagConstraints.HORIZONTAL;
  c.weightx=1;
  c.insets=new Insets(0,0,SPACING,0);
  panel.add(pythonBinaryField,c);
  browsePythonBinaryButton=new JButton("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=2;
  c.gridy=0;
  c.insets=new Insets(0,0,SPACING,0);
  panel.add(browsePythonBinaryButton,c);
  browsePythonBinaryButton.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      setupPythonBinary();
    }
  }
);
  label=new JLabel("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=0;
  c.gridy=1;
  c.anchor=GridBagConstraints.EAST;
  c.insets=new Insets(0,0,SPACING,SPACING);
  panel.add(label,c);
  mapnikScriptField=new JTextField();
  mapnikScriptField.setEnabled(false);
  c=new GridBagConstraints();
  c.gridx=1;
  c.gridy=1;
  c.fill=GridBagConstraints.HORIZONTAL;
  c.weightx=1;
  c.insets=new Insets(0,0,SPACING,0);
  panel.add(mapnikScriptField,c);
  browseMapnikScriptButton=new JButton("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=2;
  c.gridy=1;
  c.insets=new Insets(0,0,SPACING,0);
  panel.add(browseMapnikScriptButton,c);
  browseMapnikScriptButton.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      setupMapnikScript();
    }
  }
);
  label=new JLabel("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=0;
  c.gridy=2;
  c.anchor=GridBagConstraints.EAST;
  c.insets=new Insets(0,0,0,SPACING);
  panel.add(label,c);
  mapnikFileField=new JTextField();
  mapnikFileField.setEnabled(false);
  c=new GridBagConstraints();
  c.gridx=1;
  c.gridy=2;
  c.fill=GridBagConstraints.HORIZONTAL;
  c.weightx=1;
  panel.add(mapnikFileField,c);
  browseMapnikButton=new JButton("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=2;
  c.gridy=2;
  panel.add(browseMapnikButton,c);
  browseMapnikButton.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      setupInputFile();
    }
  }
);
  sep=new JSeparator(JSeparator.HORIZONTAL);
  c=new GridBagConstraints();
  c.gridy=1;
  c.fill=GridBagConstraints.HORIZONTAL;
  c.insets=new Insets(SPACING * 2,0,SPACING * 2,0);
  mapnikCard.add(sep,c);
  panel=new JPanel(new GridBagLayout());
  c=new GridBagConstraints();
  c.gridy=2;
  c.anchor=GridBagConstraints.NORTH;
  c.fill=GridBagConstraints.HORIZONTAL;
  c.weightx=1;
  c.weighty=1;
  mapnikCard.add(panel,c);
  label=new JLabel("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=0;
  c.gridy=0;
  c.anchor=GridBagConstraints.EAST;
  c.insets=new Insets(0,0,SPACING,SPACING);
  panel.add(label,c);
  labels.add(label);
  minLatitudeField=new JDoubleField(-90d);
  c=new GridBagConstraints();
  c.gridx=1;
  c.gridy=0;
  c.weightx=0.5;
  c.fill=GridBagConstraints.HORIZONTAL;
  c.insets=new Insets(0,0,SPACING,SPACING);
  panel.add(minLatitudeField,c);
  label=new JLabel("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=2;
  c.gridy=0;
  c.anchor=GridBagConstraints.EAST;
  c.insets=new Insets(0,SPACING,SPACING,SPACING);
  panel.add(label,c);
  labels.add(label);
  minLongitudeField=new JDoubleField(-180d);
  c=new GridBagConstraints();
  c.gridx=3;
  c.gridy=0;
  c.weightx=0.5;
  c.fill=GridBagConstraints.HORIZONTAL;
  c.insets=new Insets(0,0,SPACING,0);
  panel.add(minLongitudeField,c);
  label=new JLabel("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=0;
  c.gridy=1;
  c.anchor=GridBagConstraints.EAST;
  c.insets=new Insets(0,0,SPACING,SPACING);
  panel.add(label,c);
  labels.add(label);
  maxLatitudeField=new JDoubleField(90d);
  c=new GridBagConstraints();
  c.gridx=1;
  c.gridy=1;
  c.fill=GridBagConstraints.HORIZONTAL;
  c.insets=new Insets(0,0,SPACING,SPACING);
  panel.add(maxLatitudeField,c);
  label=new JLabel("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=2;
  c.gridy=1;
  c.anchor=GridBagConstraints.EAST;
  c.insets=new Insets(0,SPACING,SPACING,SPACING);
  panel.add(label,c);
  labels.add(label);
  maxLongitudeField=new JDoubleField(180d);
  c=new GridBagConstraints();
  c.gridx=3;
  c.gridy=1;
  c.fill=GridBagConstraints.HORIZONTAL;
  c.insets=new Insets(0,0,SPACING,0);
  panel.add(maxLongitudeField,c);
  previewCanvas=new JLabel();
  previewCanvas.setHorizontalAlignment(SwingConstants.CENTER);
  scrollPane=new JScrollPane(previewCanvas,JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
  previewCanvas.setBackground(Color.white);
  c=new GridBagConstraints();
  c.weightx=1;
  c.weighty=1;
  c.fill=GridBagConstraints.BOTH;
  c.anchor=GridBagConstraints.CENTER;
  blPanel.add(scrollPane,c);
  tileTypeLabel=new JLabel("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=0;
  c.gridy=0;
  c.anchor=GridBagConstraints.EAST;
  c.insets=new Insets(0,0,SPACING,SPACING);
  trPanel.add(tileTypeLabel,c);
  panel=new JPanel(new GridBagLayout());
  c=new GridBagConstraints();
  c.gridx=1;
  c.gridy=0;
  c.weightx=1;
  c.anchor=GridBagConstraints.WEST;
  c.insets=new Insets(0,0,SPACING,0);
  trPanel.add(panel,c);
  al=new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      tileTypeChanged();
    }
  }
;
  imageRadio=new JRadioButton("String_Node_Str");
  imageRadio.setSelected(true);
  c=new GridBagConstraints();
  c.gridx=0;
  panel.add(imageRadio,c);
  imageRadio.addActionListener(al);
  elevationRadio=new JRadioButton("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=1;
  panel.add(elevationRadio,c);
  elevationRadio.addActionListener(al);
  bg=new ButtonGroup();
  bg.add(imageRadio);
  bg.add(elevationRadio);
  label=new JLabel("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=0;
  c.gridy=1;
  c.anchor=GridBagConstraints.EAST;
  c.insets=new Insets(0,0,SPACING,SPACING);
  trPanel.add(label,c);
  labels.add(label);
  panel=new JPanel(new GridBagLayout());
  c=new GridBagConstraints();
  c.gridx=1;
  c.gridy=1;
  c.anchor=GridBagConstraints.WEST;
  c.insets=new Insets(0,0,SPACING,0);
  trPanel.add(panel,c);
  tilesizeField=new JIntegerField(512);
  tilesizeField.setPositive(true);
  c=new GridBagConstraints();
  c.gridx=0;
  size=tilesizeField.getPreferredSize();
  size.width=50;
  tilesizeField.setMinimumSize(size);
  tilesizeField.setMaximumSize(size);
  tilesizeField.setPreferredSize(size);
  panel.add(tilesizeField,c);
  tilesizeField.getDocument().addDocumentListener(new DocumentAdapter(){
    @Override public void anyChange(    DocumentEvent e){
      if (!tilesizeBeingSet) {
        tilesizeChanged=true;
      }
    }
  }
);
  tilesizeField.addFocusListener(new FocusAdapter(){
    @Override public void focusLost(    FocusEvent e){
      tilesizeChanged();
    }
  }
);
  label=new JLabel("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=1;
  c.insets=new Insets(0,SPACING / 2,0,0);
  panel.add(label,c);
  labels.add(label);
  label=new JLabel("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=0;
  c.gridy=2;
  c.anchor=GridBagConstraints.EAST;
  c.insets=new Insets(0,0,SPACING,SPACING);
  trPanel.add(label,c);
  labels.add(label);
  panel=new JPanel(new GridBagLayout());
  c=new GridBagConstraints();
  c.gridx=1;
  c.gridy=2;
  c.anchor=GridBagConstraints.WEST;
  c.insets=new Insets(0,0,SPACING,0);
  trPanel.add(panel,c);
  lztsField=new JDoubleField(36d);
  c=new GridBagConstraints();
  c.gridx=0;
  size=lztsField.getPreferredSize();
  size.width=50;
  lztsField.setMinimumSize(size);
  lztsField.setMaximumSize(size);
  lztsField.setPreferredSize(size);
  panel.add(lztsField,c);
  lztsField.getDocument().addDocumentListener(new DocumentAdapter(){
    @Override public void anyChange(    DocumentEvent e){
      if (!lztsBeingSet) {
        lztsChanged=true;
      }
    }
  }
);
  label=new JLabel("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=1;
  c.insets=new Insets(0,SPACING / 2,0,0);
  panel.add(label,c);
  labels.add(label);
  levelsLabel=new JLabel("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=0;
  c.gridy=3;
  c.anchor=GridBagConstraints.EAST;
  c.insets=new Insets(0,0,SPACING,SPACING);
  trPanel.add(levelsLabel,c);
  levelsSpinner=new JSpinner(new SpinnerNumberModel(5,1,100,1));
  c=new GridBagConstraints();
  c.gridx=1;
  c.gridy=3;
  c.anchor=GridBagConstraints.WEST;
  c.insets=new Insets(0,0,SPACING,0);
  trPanel.add(levelsSpinner,c);
  imageFormatLabel=new JLabel("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=0;
  c.gridy=4;
  c.anchor=GridBagConstraints.EAST;
  c.insets=new Insets(0,0,SPACING,SPACING);
  trPanel.add(imageFormatLabel,c);
  panel=new JPanel(new GridBagLayout());
  c=new GridBagConstraints();
  c.gridx=1;
  c.gridy=4;
  c.anchor=GridBagConstraints.WEST;
  c.insets=new Insets(0,0,SPACING,0);
  trPanel.add(panel,c);
  al=new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      imageFormatChanged();
    }
  }
;
  jpegRadio=new JRadioButton("String_Node_Str");
  jpegRadio.setSelected(true);
  c=new GridBagConstraints();
  c.gridx=0;
  panel.add(jpegRadio,c);
  jpegRadio.addActionListener(al);
  pngRadio=new JRadioButton("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=1;
  panel.add(pngRadio,c);
  pngRadio.addActionListener(al);
  bg=new ButtonGroup();
  bg.add(jpegRadio);
  bg.add(pngRadio);
  alphaCheck=new JCheckBox("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=0;
  c.gridy=5;
  c.anchor=GridBagConstraints.WEST;
  c.gridwidth=2;
  c.insets=new Insets(0,0,SPACING,0);
  trPanel.add(alphaCheck,c);
  alphaCheck.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      alphaSet=alphaCheck.isSelected();
      bandCountChanged();
    }
  }
);
  cellTypeLabel=new JLabel("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=0;
  c.gridy=6;
  c.anchor=GridBagConstraints.EAST;
  c.insets=new Insets(0,0,SPACING,SPACING);
  trPanel.add(cellTypeLabel,c);
  panel=new JPanel(new GridBagLayout());
  c=new GridBagConstraints();
  c.gridx=1;
  c.gridy=6;
  c.anchor=GridBagConstraints.WEST;
  c.insets=new Insets(0,0,SPACING,0);
  trPanel.add(panel,c);
  al=new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      elevationFormatChanged();
    }
  }
;
  byteRadio=new JRadioButton("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=0;
  panel.add(byteRadio,c);
  byteRadio.addActionListener(al);
  int16Radio=new JRadioButton("String_Node_Str");
  int16Radio.setSelected(true);
  c=new GridBagConstraints();
  c.gridx=1;
  panel.add(int16Radio,c);
  int16Radio.addActionListener(al);
  int32Radio=new JRadioButton("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=2;
  panel.add(int32Radio,c);
  int32Radio.addActionListener(al);
  float32Radio=new JRadioButton("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=3;
  panel.add(float32Radio,c);
  float32Radio.addActionListener(al);
  bg=new ButtonGroup();
  bg.add(byteRadio);
  bg.add(int16Radio);
  bg.add(int32Radio);
  bg.add(float32Radio);
  bandLabel=new JLabel("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=0;
  c.gridy=7;
  c.anchor=GridBagConstraints.EAST;
  c.insets=new Insets(0,0,SPACING,SPACING);
  trPanel.add(bandLabel,c);
  panel=new JPanel(new GridBagLayout());
  c=new GridBagConstraints();
  c.gridx=1;
  c.gridy=7;
  c.anchor=GridBagConstraints.WEST;
  c.insets=new Insets(0,0,SPACING,0);
  trPanel.add(panel,c);
  bandCombo=new JComboBox(new Integer[]{1});
  bandCombo.setSelectedIndex(0);
  c=new GridBagConstraints();
  c.gridx=0;
  panel.add(bandCombo,c);
  overviewsCheck=new JCheckBox("String_Node_Str");
  overviewsCheck.setSelected(true);
  c=new GridBagConstraints();
  c.gridx=0;
  c.gridy=8;
  c.gridwidth=2;
  c.anchor=GridBagConstraints.WEST;
  c.insets=new Insets(0,0,SPACING,0);
  trPanel.add(overviewsCheck,c);
  panel=new JPanel(new GridBagLayout());
  c=new GridBagConstraints();
  c.gridx=0;
  c.gridy=9;
  c.gridwidth=2;
  c.anchor=GridBagConstraints.WEST;
  trPanel.add(panel,c);
  overrideLevelsCheck=new JCheckBox("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=0;
  c.insets=new Insets(0,0,SPACING,SPACING);
  panel.add(overrideLevelsCheck,c);
  overrideLevelsCheck.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      if (mapnikRadio.isSelected() && !overrideLevelsCheck.isSelected()) {
        overrideLevelsCheck.setSelected(true);
      }
      enableFields();
    }
  }
);
  overrideLevelsSpinner=new JSpinner(new SpinnerNumberModel(1,1,100,1));
  c=new GridBagConstraints();
  c.gridx=1;
  c.insets=new Insets(0,0,SPACING,0);
  panel.add(overrideLevelsSpinner,c);
  outsideCheck=new JCheckBox("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=0;
  c.gridy=10;
  c.gridwidth=2;
  c.anchor=GridBagConstraints.WEST;
  trPanel.add(outsideCheck,c);
  outsideCheck.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      enableFields();
    }
  }
);
  outsidePanel=new JPanel(new GridBagLayout());
  c=new GridBagConstraints();
  c.gridx=1;
  c.gridy=11;
  c.anchor=GridBagConstraints.WEST;
  c.insets=new Insets(0,0,SPACING,0);
  trPanel.add(outsidePanel,c);
  replaceCheck=new JCheckBox("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=0;
  c.gridy=12;
  c.gridwidth=2;
  c.anchor=GridBagConstraints.WEST;
  trPanel.add(replaceCheck,c);
  replaceCheck.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      enableFields();
    }
  }
);
  replace1Label=new JLabel("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=0;
  c.gridy=13;
  c.anchor=GridBagConstraints.EAST;
  c.insets=new Insets(0,0,SPACING,SPACING);
  trPanel.add(replace1Label,c);
  minPanel=new JPanel(new GridBagLayout());
  c=new GridBagConstraints();
  c.gridx=1;
  c.gridy=13;
  c.anchor=GridBagConstraints.WEST;
  c.insets=new Insets(0,0,SPACING,0);
  trPanel.add(minPanel,c);
  replace2Label=new JLabel("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=0;
  c.gridy=14;
  c.anchor=GridBagConstraints.EAST;
  c.insets=new Insets(0,0,SPACING,SPACING);
  trPanel.add(replace2Label,c);
  maxPanel=new JPanel(new GridBagLayout());
  c=new GridBagConstraints();
  c.gridx=1;
  c.gridy=14;
  c.anchor=GridBagConstraints.WEST;
  c.insets=new Insets(0,0,SPACING,0);
  trPanel.add(maxPanel,c);
  replace3Label=new JLabel("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=0;
  c.gridy=15;
  c.anchor=GridBagConstraints.EAST;
  c.insets=new Insets(0,0,SPACING,SPACING);
  trPanel.add(replace3Label,c);
  min2Panel=new JPanel(new GridBagLayout());
  c=new GridBagConstraints();
  c.gridx=1;
  c.gridy=15;
  c.anchor=GridBagConstraints.WEST;
  c.insets=new Insets(0,0,SPACING,0);
  trPanel.add(min2Panel,c);
  replace4Label=new JLabel("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=0;
  c.gridy=16;
  c.anchor=GridBagConstraints.EAST;
  c.insets=new Insets(0,0,SPACING,SPACING);
  trPanel.add(replace4Label,c);
  max2Panel=new JPanel(new GridBagLayout());
  c=new GridBagConstraints();
  c.gridx=1;
  c.gridy=16;
  c.anchor=GridBagConstraints.WEST;
  c.insets=new Insets(0,0,SPACING,0);
  trPanel.add(max2Panel,c);
  replace5Label=new JLabel("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=0;
  c.gridy=17;
  c.anchor=GridBagConstraints.EAST;
  c.insets=new Insets(0,0,SPACING,SPACING);
  trPanel.add(replace5Label,c);
  withPanel=new JPanel(new GridBagLayout());
  c=new GridBagConstraints();
  c.gridx=1;
  c.gridy=17;
  c.anchor=GridBagConstraints.WEST;
  c.insets=new Insets(0,0,SPACING,0);
  trPanel.add(withPanel,c);
  replace6Label=new JLabel("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=0;
  c.gridy=18;
  c.anchor=GridBagConstraints.EAST;
  c.insets=new Insets(0,0,SPACING,SPACING);
  trPanel.add(replace6Label,c);
  otherwisePanel=new JPanel(new GridBagLayout());
  c=new GridBagConstraints();
  c.gridx=1;
  c.gridy=18;
  c.anchor=GridBagConstraints.WEST;
  c.insets=new Insets(0,0,SPACING,0);
  trPanel.add(otherwisePanel,c);
  panel=new JPanel(new GridBagLayout());
  c=new GridBagConstraints();
  c.gridx=0;
  c.gridy=19;
  c.weighty=1;
  trPanel.add(panel,c);
  panel=new JPanel(new GridBagLayout());
  c=new GridBagConstraints();
  c.gridx=0;
  c.gridy=0;
  c.fill=GridBagConstraints.HORIZONTAL;
  brPanel.add(panel,c);
  label=new JLabel("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=0;
  c.insets=new Insets(0,0,SPACING,SPACING);
  panel.add(label,c);
  outputDirectory=new JTextField();
  c=new GridBagConstraints();
  c.gridx=1;
  c.fill=GridBagConstraints.HORIZONTAL;
  c.weightx=1;
  c.insets=new Insets(0,0,SPACING,0);
  panel.add(outputDirectory,c);
  outputDirectory.getDocument().addDocumentListener(new DocumentAdapter(){
    @Override public void anyChange(    DocumentEvent e){
      String text=outputDirectory.getText();
      File dir=new File(text);
      if (dir.isDirectory()) {
        preferences.put(OUTPUT_DIR_KEY,text);
      }
    }
  }
);
  outputButton=new JButton("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=2;
  c.insets=new Insets(0,0,SPACING,0);
  panel.add(outputButton,c);
  outputButton.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      JFileChooser chooser=new JFileChooser(preferences.get(OUTPUT_DIR_KEY,null));
      chooser.setAcceptAllFileFilterUsed(false);
      chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
      if (chooser.showOpenDialog(frame) == JFileChooser.APPROVE_OPTION) {
        File dir=chooser.getSelectedFile();
        outputDirectory.setText(dir.getAbsolutePath());
        preferences.put(OUTPUT_DIR_KEY,dir.getAbsolutePath());
      }
    }
  }
);
  tileText=new JTextArea();
  tileText.setBackground(label.getBackground());
  tileText.setEditable(false);
  tileText.setFont(font);
  scrollPane=new JScrollPane(tileText,JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
  size=new Dimension(20,20);
  scrollPane.setMinimumSize(size);
  scrollPane.setPreferredSize(size);
  c=new GridBagConstraints();
  c.gridx=0;
  c.gridy=1;
  c.fill=GridBagConstraints.BOTH;
  c.weighty=1;
  c.weightx=1;
  c.anchor=GridBagConstraints.NORTH;
  c.insets=new Insets(0,0,SPACING,0);
  brPanel.add(scrollPane,c);
  panel=new JPanel(new GridBagLayout());
  c=new GridBagConstraints();
  c.gridx=0;
  c.gridy=2;
  brPanel.add(panel,c);
  tileButton=new JButton("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=0;
  c.insets=new Insets(0,0,0,SPACING);
  panel.add(tileButton,c);
  tileButton.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      generateTiles();
    }
  }
);
  cancelButton=new JButton("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=1;
  panel.add(cancelButton,c);
  cancelButton.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      cancel();
    }
  }
);
  JButton previewButton=new JButton("String_Node_Str");
  c=new GridBagConstraints();
  c.gridx=2;
  panel.add(previewButton,c);
  previewButton.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      preview();
    }
  }
);
  updatePythonFields();
  addRecalculateListeners();
  openDataset(null);
  datasetModeChanged();
  logger.info("String_Node_Str");
  if (!GDALUtil.isProjectionsSupported()) {
    logger.warning("String_Node_Str");
  }
  loadFrameBounds();
  loadSplitLocations();
  frame.setVisible(true);
}