if (command == DimensionQueryPanel.WIDTH_CMD || command == DimensionQueryPanel.HEIGHT_CMD) { setDesiredIconDimension(dqp.getDimension()); }
    public void actionPerformed(ActionEvent ae) {        String command = ae.getActionCommand();        if (command == CREATE_IMAGE_CMD && library != null && nameField != null) {            Dimension d = getDesiredIconDimension();            ImageIcon ii = library.getIcon(getCode(), d);            if (ii == null) {                createImageFileButton.setEnabled(false);                return;            }            try {                BufferedImage bi = BufferedImageHelper.getBufferedImage(ii.getImage(),                        0,                        0,                        (int) d.getWidth(),                        (int) d.getHeight(),                        BufferedImage.TYPE_INT_ARGB);                ImageFormatter formatter = new AcmeGifFormatter();                byte[] imageBytes = formatter.formatImage(bi);                String newFileName = FileUtils.getFilePathToSaveFromUser("Create File To Save");                if (newFileName != null) {                    FileOutputStream fos = new FileOutputStream(newFileName);                    fos.write(imageBytes);                    fos.flush();                    fos.close();                }            } catch (InterruptedException e) {                e.printStackTrace();            } catch (FileNotFoundException e) {                e.printStackTrace();            } catch (IOException e) {                e.printStackTrace();            }        }        if (command == NAMEFIELD_CMD) {            handleManualNameFieldUpdate(getCode());        }        if (command == DimensionQueryPanel.WIDTH_CMD                || command == DimensionQueryPanel.HEIGHT_CMD) {            setDesiredIconDimension(dqp.getDimension());        }    }