// Create the cboSelectGroup, and add it to the navigation panel:
        //String[] strDefaults = {"Defaults"};
        //cboSelectGroup = new JComboBox(strDefaults);Public Class Form1

        cboSelectGroup.setPreferredSize(new Dimension(150, 40));
        cboSelectGroup.setMinimumSize(new Dimension(150, 40));

        cboSelectGroup.addActionListener(new java.awt.event.ActionListener() {

            public void actionPerformed(java.awt.event.ActionEvent evt) {

                btnImagesActionPerformed(evt);

            }

        });

We were trying to create a file with an image after pressing a save button. We recently fixed it.

        // Convert path to string...
        String src = baseDir + "/" + newDir;

        // Create new file...
        File javaFilePath = new File(src, "/" + lblCaption.getText() + ".png");
        File oldImage = new File(imageFilename);

        if (! javaFilePath.exists()){

            FileChannel copyFile = new FileInputStream(oldImage).getChannel();
            FileChannel dest = new FileOutputStream(javaFilePath).getChannel();
            dest.transferFrom(copyFile, 0, copyFile.size());
            JOptionPane.showMessageDialog(null, "Folder/Category, Image and Caption saved!!!");

        } // End if() {}...
This article has been dead for over six months. Start a new discussion instead.