Package javax.swing

Examples of javax.swing.JFileChooser.showOpenDialog()


    }// </editor-fold>//GEN-END:initComponents

    private void buttonBrowseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonBrowseActionPerformed
        final JFileChooser chooser = new JFileChooser();
        if (chooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION)
        {
            try {
                textFile.setText(chooser.getSelectedFile().getCanonicalPath());
            } catch (IOException ex) {
                ErrorDialog.showError(this, ex);
View Full Code Here


     
    }//GEN-LAST:event_buttonChooseCaptureDeviceActionPerformed

    private void buttonBrowseFileActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonBrowseFileActionPerformed
    final JFileChooser chooser = new JFileChooser();
    if (chooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION)
    {
      final String path = URLUtils.createUrlStr(chooser.getSelectedFile());
      textFieldURL.setText(path);
    }
    }//GEN-LAST:event_buttonBrowseFileActionPerformed
View Full Code Here

    /** debug - parse the atom chosen by user
     */
    public static void main (String[] args) {
        JFileChooser chooser = new JFileChooser ();
        int response = chooser.showOpenDialog(null);
        if (response == JFileChooser.CANCEL_OPTION)
            return;
        File f = chooser.getSelectedFile();
        try {
            ParsedAtom[] atomTree = parseAtoms (f);
View Full Code Here

      File mediaFile = null;

      JFileChooser chooser = new JFileChooser(getChooserRoot());
      chooser.addChoosableFileFilter(new MixFileFilter());

      int rc = chooser.showOpenDialog(SimpleMixer.this);

      if (rc == JFileChooser.APPROVE_OPTION) {
    mediaFile = chooser.getSelectedFile();
    if (mediaFile != null) {
        MediaLocator ml = null;
View Full Code Here

  }
 
  public void onOpenFile()
  {
    final JFileChooser chooser = new JFileChooser();
    if (chooser.showOpenDialog(PlayerPanel.this) ==JFileChooser.APPROVE_OPTION)
    {
      final String urlStr = URLUtils.createUrlStr(chooser.getSelectedFile());
      addMediaLocatorAndLoad(urlStr);
    }
  }
View Full Code Here

         {
            chooser.setCurrentDirectory(new File(dirName));
         }
      }
      _sqlPanelAPI.getSession().selectMainTab(ISession.IMainPanelTabIndexes.SQL_TAB);
      if (chooser.showOpenDialog(frame) == JFileChooser.APPROVE_OPTION)
      {
          result = true;
         File selectedFile = chooser.getSelectedFile();
         if (!appendToExisting) {
             _sqlPanelAPI.setEntireSQLScript("");
View Full Code Here

                String path = f.getAbsolutePath();
                if (path != null && !"".equals(path)) {
                    chooser.setCurrentDirectory(new File(path));
                }
            }
      int returnVal = chooser.showOpenDialog(this);
      if(returnVal == JFileChooser.APPROVE_OPTION) {
        //  System.out.println("You chose to open this file: " +
        //    chooser.getSelectedFile().getName());
        try {
          fileNameField.setText(chooser.getSelectedFile().getCanonicalPath());
View Full Code Here

                fd.setDialogTitle( DemoApp.getRes().getString( "Select Executable for customization" ) );
                fd.setFileHidingEnabled( true );
                fd.setApproveButtonText( DemoApp.getRes().getString( "Load Executable" ) );
                FileFilter filter = new ExtensionFilter( DemoApp.getRes().getString( "Wrapper Executable (*.exe)" ), new String[] { "exe" } );
                fd.setFileFilter( filter );
                int returnVal = fd.showOpenDialog( CustomizeDialog.this );

                if ( returnVal == JFileChooser.APPROVE_OPTION )
                {
                    try
                    {
View Full Code Here

                fd.setDialogTitle( DemoApp.getRes().getString( "Select Icon for customization" ) );
                fd.setFileHidingEnabled( true );
                fd.setApproveButtonText( DemoApp.getRes().getString( "Load Icon" ) );
                FileFilter filter = new ExtensionFilter( DemoApp.getRes().getString( "Icon File (*.ico)" ), new String[] { "ico" } );
                fd.setFileFilter( filter );
                int returnVal = fd.showOpenDialog( CustomizeDialog.this );

                if ( returnVal == JFileChooser.APPROVE_OPTION )
                {
                    try
                    {
View Full Code Here

                fd.setDialogTitle( DemoApp.getRes().getString( "Select splash screen for customization" ) );
                fd.setFileHidingEnabled( true );
                fd.setApproveButtonText( DemoApp.getRes().getString( "Load splash screen" ) );
                FileFilter filter = new ExtensionFilter( DemoApp.getRes().getString( "Splash screen File (*.bmp)" ), new String[] { "bmp" } );
                fd.setFileFilter( filter );
                int returnVal = fd.showOpenDialog( CustomizeDialog.this );

                if ( returnVal == JFileChooser.APPROVE_OPTION )
                {
                    try
                    {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.