Possible alternative to input dialog box

The program I'm creating would like to utilize the functionality of an input dialog box, however, I would like for the input dialog box to return a group of values instead of just one. As far as I can tell, the input dialog box can return a single String based an a group of values that I supply. However, the program I use would want the user to be able to select several of those values. Is there a way to have the input dialog box return a String[]? Perhaps there is another option that I'm not really aware of that can mimic the input dialog box functionality?

Hi,
You might create some complex JComponent (a JPanel containing lots of check boxes and text fields etc). Use that component as a message. Then, when the user clicks the OK button, investigate your complex component for all its values.
Piet

Similar Messages

  • Input Dialog box

    how to get value from Input dialog box?

    --String input=JOptionPane.showInputDialog(null, "Enter a String: ", "Input Dialog", 1);
              System.out.println ("You inputted: "+input);

  • Trying to create an input dialog box, that will halt execution

    I am trying to get a pop up dialog box to appear where the user will enter their name, after clicking OK or Cancel, i would like the code to continue executing.  For example when i use the Alert.show("1");Alert.show("2");Alert.show("3");  it appears as 3,2,1. Is it possible to fire one alter at a time AFTER the user has clicked Ok.
    Back to the originial question.
    I am setting up a Pop up menu
    var ret:String;
    var Dialog:SimpleTitleWindowExample =SimpleTitleWindowExample(PopUpManager.createPopUp( this, SimpleTitleWindowExample , true));
    ret = Dialog.Input      //where input is just a public text for example
    return ret;
    ^returns null.
    I was hoping it would wait until  it was closed to continue. I thought it would by setting the modal = true
    Essentially I'm asking is there a way to halt execution until the user inputs some text? Doesn't have to utilize the PopUpManager.
    Please help. I've spent 4 hours trying to tackle this.  I even tried to do a DoEvent (Visual Studio) type loop until the button was clicked or variable was no longer blank.

    I think you may alternately be able to listen for the removedFromStage event and react to that. In any case, you need some way of reacting to SampleTitleWindow closing (via an event listener), and only then trigger the next pop-up.

  • Alternatives to "dialog box" for on screen notification

    I would like to activate a small notice on screen while my script is working. This will prevent others from doing work on the machine while its doing its magic in the background. The "dialog box" stops background tasks from happening. I found iNotify, but the product is no more. Any alternatives to a dialog box? Thanks - J

    I think CB wants to lock the screen so that others can't use the machine while the script is running (though I can't quite imagine why - macs are designed to multi-task). I don't know of a way to do that in a normal user account from applescript. if that's what you're after, you'll probably either want to write a cocoa shell for your applescript that takes over and locks down the screen, or else you'll want to restart into a special user account that has no GUI, run your script, then reboot into the user's account.

  • How to make a dialog box for a user to choose a file from disk

    Hi there
    Is it possible to make a dialog box, for a photoshop user, to choose a txt file, to be process by my javascript ?
    I have a txt file with all the names and locations of psd files i want to process by photoshop. I have ex. 100 out of a folder with 250 images.
    If anyone have a shot "code sample" how to select a file - i will be happy.
    /T

    Here is an example of selecting a text file...
    var dlg=
    "dialog{text:'Script Interface',bounds:[100,100,500,220],"+
    "testFile:EditText{bounds:[10,40,310,60] , text:'' ,properties:{multiline:false,noecho:false,readonly:false}},"+
    "Browse:Button{bounds:[320,40,390,61] , text:'<<' },"+
    "statictext0:StaticText{bounds:[10,10,240,27] , text:'Please select Text File' ,properties:{scrolling:undefined,multiline:undefined}},"+
    "Process:Button{bounds:[10,80,190,101] , text:'Process' },"+
    "button2:Button{bounds:[210,80,390,101] , text:'Cancel' }};"
    var win = new Window(dlg,'test');
    win.center();
    win.testFile.enabled=false;
    win.Browse.onClick = function() {
    selectedFile = File.openDialog("Please select TEXT file.","TEXT File:*.txt");
      if(selectedFile != null) win.testFile.text =  decodeURI(selectedFile.fsName);
    win.Process.onClick = function() {
    if(win.testFile.text == '') {
      alert("No text file has been selected!");
      return;
    win.close(1);
    selectedFile.execute();
    win.show();

  • SaveAs dialog box

    Hello all,
    i have made an application to save dynamic textfield text to
    a external .txt file.
    For this i have used a button in my application named
    "saveBtn".As user click this button (saveBtn) i want to open a
    saveas dialog box.
    Is it possible to open Saveas dialog box via actionscript or
    there is any kind of component that directly opens saveas dialog
    box.
    please help me.
    thank you so much

    FYI - ajax is a technology, it's not any discreet 'thing'.
    You could use
    PHP, ASP, or others server-side scripting languages but you
    could not use
    ajax.
    Dave -
    Head Developer
    http://www.blurredistinction.com
    Adobe Community Expert
    http://www.adobe.com/communities/experts/

  • Input dialog question OK/Cancel Button

    Hi there,
    I�m busy with an application that displays an input dialog box on start up. It prompts the user for their name. This imput will then be used for a JLabel welcoming the user with their name. If no name is entered. The Jlabel will display �Welcone User�. Everythng works fine but when I press cancel on the input dialog box I get an error. Below is some code of what I�ve done so far.
    Thanks,
    Patrick.
    String name = JOptionPane.showInputDialog(null,
              "Please enter your name",
              "Name input",
              JOptionPane.PLAIN_MESSAGE);
              welcome = new JLabel(name);
              if (name.length() == 0) {
                   welcome = new JLabel("Welcome User");
              else if (name.length() > 0) {
                   welcome = new JLabel("Welcome " + name);

    The error is NullPointerException.
    If the cancel button is pushed a null is returned.
    Try this test instead
    if ((name == null) || (name.length() == 0))
       welcome = new JLabel("Welcome User");
    }

  • Resolve File Saving Conflict Dialog Box

    Hi, I developed a new GUI for teststand. The problem is with the executable of the GUI, because at the end of the test it does not closed itself. I have to terminate the process by the TaskManager. 
    When I used the GUI instead of the executable, it appears the dialog box attached. During the test some station globals are overwritten.
    I am afreid that is the dialog box that stop the automatic closure of the exe.
    Does anyone know how is possible to disable that dialog box?
    Thanks a lot. 

    This does not have anything to do with type conflicts.  You likely have two applications that are using the TestStand Engine.  One is completing and modifying the StationGlobals.ini file.  At the same time, your second application also is modifying the StationGlobals in a different way.  If you save the second application, it will overwrite what the first application did.  So you are prompted to decide which version you want to keep.  
    This dialog occurs because there is code that calls Engine.CommitGlobalsToDisk.  This method has a parameter called "promptOnSaveConflicts" that gives the option to display this prompt.  However, I believe this method is likely called internally by the ApplicationMgr control.  I haven't found a way to have the ApplicationMgr call this function with a false parameter value.  Before shutting down your application, you could call Engine.CommitGlobalsToDisk with the false parameter and then shut down, which should make the problem go away.
    However, you do risk overwriting global data so I would examine what you are doing to see if you expect to have multiple applications modifying the globals.   If this is unexpected, you likely have a problem.  I didn't quite understand the different between your GUI and EXE or what you are trying to accomplish, so perhaps there is a better way to implement what you want to accomplish.

  • Create dialog box...

    sometimes i click on garageband in the dock by accident. instead of force quitting or waiting for my song to load and then quitting...is it possible to create a dialog box that asks "do you really want to open gb?"
    any help would be appreciated. thanks in advance

    Hi!
    Try these fm-s:
    G_CHECK_PASSWORD
    SSFH_PASSWORD_PROMPT
    and any password ones in SE37...
    Regards
    Tamá

  • Adobe Indesign CC2014 and mac freeze crash at dialog box "nouveautés"

    Hi !
    Adobe Indesign CC2014 and the mac freeze crash when the dialog box "nouveautés" appears !
    The Indesign CC work fine and doesn't crash, but the CC2014 freeze on this dialog box !
    Is there a possibility to do this dialog box don't appears ? In preference file to edit on the disc for exemple ? or a file to delete ?
    Thanks

    Thanks pooja2087 but that doesn't work !
    But I have news :
    I have started without extensions (with "Maj") and then the windows "Nouveautés" appears but totally white, but that is working, i can close the windows and work with indesign. But the windows appears on next launch because I cannot clic on the "don't show next time" case (the windows is white).
    Then this windows is the problem (probably directX function that crash my old computer (this one is old)).
    Then how can I desactivate this window on startup ?

  • Java Dialog Box

    How would you make a Data Input Dialog using Java? I am fairly new to Java and im used to programming with C# but for my school syllabus I have to use Java to make database... So how can I make an input dialog box to input like a set of data. I know how to use JOptionPane to input data one by one but how do I input a set of data using a dialog box?
    thx

    depends on how fancy you want to make it.
    you can still use a joptionpane for your 'multiple' input:
    (note: error handling seriously lacking)
    import javax.swing.*;
    import java.awt.*;
    class Testing
      public static void main(String[] args)
        JLabel nameLbl = new JLabel("Name:");
        JLabel addressLbl = new JLabel("Address:");
        JTextField nameTF = new JTextField(5);
        JTextField address1TF = new JTextField(5);
        JTextField address2TF = new JTextField(5);
        JPanel p = new JPanel(new GridLayout(3,2));
        p.add(nameLbl);p.add(nameTF);
        p.add(addressLbl);p.add(address1TF);
        p.add(new JLabel());p.add(address2TF);
        JOptionPane.showMessageDialog(null,p);
        System.out.println("Your name is "+nameTF.getText());
        System.out.println("Your address is:\n"+address1TF.getText()+"\n"+address2TF.getText());
        System.exit(0);
    }

  • Input dialog help...

    I cannot seem to find if there is a way to create an input dialog box that accepts a String as input but only has an 'OK' button and no 'Cancel' button.
    It seems that the 'Cancel' button is put in by default. Is there any way to eliminate it or do I have to write my own class?
    Edited by: gabel3469 on May 16, 2008 5:07 AM

    the best is to impose the user to input with something like:
    do
       // prompt the dialog
    while (userInput.equals("") || optionChosen = CLOSED_OPTION || optionChosen == CANCEL_OPTION);

  • Smartform no dialog box

    I want the print dialog to appear when I execute the in background mode (thru output type, document SAVE)
    I have
    CONTROL_PARAMETERS-NO_DIALOG = ' '.
    But the dialog does not appear. But when I run the program in foreground mode it appear. I have seen print dialog appearing and
    most of the people have problem suppressing the dialog, but for me the dialog is not appearing. I wrote custom print program.
    Any suggestions please.
    Thanks,
    AP

    HI AP,
    It is not possible to get a dialog box when running a background job or a transaction in background mode. With a background job, there is no GUI connection to the backend so no dialog is possible,
    Regards,
    Aidan

  • How to supress dialog box in SUBMIT (Program_name) clause

    Hello Experts,
    statement like this:
    SUBMIT RKACOR04  using SELECTION-SET 'TEST' EXPORTING LIST TO MEMORY
                  AND RETURN .
    but during the process there is a dialog box which prevend automatic processing. is it possible to supress the dialog box via additional clause?
    Thanks

    Are you sure you want to use this report, it is not intended for a regular/periodic use, this program adjusts total and detail records in CO tables in case of difference
    Use RKACOR04 only with support from the SAP Hotline service or from an expert consultant for CO data structures.
    also
    SAP recommends running the report in the background.
    You should correct the cause of dysfunction, and then only run once this report when actually needed, also read the OSS notes on this report.
    Regards,
    Raymond

  • Is it possible to call a subscreen/modal dialog box from the global class

    Hi,
    Is it possible to call a subscreen or modal dialog box from the global class ..
    or is there any option to display a pop screen or subscreen in order to get the values from user which as to be implemented
    in the global class..
    thanks and regards,
    Poornima.

    Hi Poornima,
    you should follow Uwe's suggestion. The only alternative I can imagine is dynamic document in a dialog container. But I don't know any standardized classes to make use with minimum effort. Have a look at report DD_ADD_FORM_INPUT. Here they put the input field in a container control in a screen; you can put the container control on a dialog container (CL_GUI_DIALOGBOX_CONTAINER).
    We will not get rid of any screen for the time being, but if your application is started from any screen, the DIALOGBOX_CONTAINER can start from there.
    Regards,
    Clemens

Maybe you are looking for