How to Show a Model Dialog box in a JApplet

I have a JTable in a JApplet.
I need to display a JDialog box as a Model Dialog. The JDialog expects a Frame as parent. How do I create a Frame and show my own dialog box? without a parent Frame the dialog shows up as a Modeless dialog box.
Any help would be appreciated.

I found the answer in
http://www.jguru.com/faq/view.jsp?EID=27423

Similar Messages

  • How to 'Exit' OO ALV screen type 'Model Dialog Box' using 'X' on the top?

    HI Experts,
    I have the below issue in my OO ALV screen type 'Model Dialog Box'...
    The main screen is OO ALV and displays rows of data,
    When select a line(row) and push any buttons
    ( u201CAdd Materialu201D, u201CAdd Binu201D, u201CModify Binu201D, u201CMove Materialu201D, u201CDisplay Batchesu201D)
    the program will take you to next screen and it is a u201CModal dialog boxu201D type.
    That screen has two buttons to exit ( u201CSAVEu201D and u201CCancelu201D ) on the bottom of the screen.
    User would like to exit the screen using u201CXu201D on the top line right corner.
    That u201CXu201D is not on for the u201CModal dialog boxu201D type screen.
    How do I add event to close that screen using u201CXu201D?
    Thanks in advance,
    John.

    data :GR_EVENT_HANDLER    TYPE REF TO LCL_EVENT_HANDLER,
           GR_DIALOG_CONTAINER TYPE REF TO CL_GUI_DIALOGBOX_CONTAINER,
    CLASS LCL_EVENT_HANDLER DEFINITION.
      PUBLIC SECTION.
        METHODS :
        HANDLE_USER_COMMAND FOR EVENT USER_COMMAND OF CL_GUI_ALV_GRID
        IMPORTING E_UCOMM,
        HANDLE_ON_DIALOGBOX_CLOSE FOR EVENT CLOSE OF CL_GUI_DIALOGBOX_CONTAINER
        IMPORTING SENDER,
    ENDCLASS.                    "lcl_event_handler DEFINITION
    CLASS LCL_EVENT_HANDLER IMPLEMENTATION.
    METHOD HANDLE_USER_COMMAND.
      CASE E_UCOMM.
         WHEN 'DBCON'.
            PERFORM DIALOG_DISPLAY.
      ENDCASE.
      ENDMETHOD.                    "HANDLE_USER_COMMAND
      METHOD HANDLE_ON_DIALOGBOX_CLOSE.
        IF NOT SENDER IS INITIAL.
          CALL METHOD SENDER->FREE
            EXCEPTIONS
              OTHERS = 1.
          FREE GR_DIALOG_CONTAINER.
          CLEAR GR_DIALOG_CONTAINER.
        ENDIF.
      ENDMETHOD.                    "handle_on_dialogbox_close
    ENDCLASS.                    "lcl_event_handler IMPLEMENTATION
    FORM DIALOG_DISPLAY .
      DATA : L_TEXT(255),
                  L_LIN TYPE I.
      IF GR_DIALOG_CONTAINER IS INITIAL.
        CREATE OBJECT GR_DIALOG_CONTAINER
          EXPORTING
          PARENT                      =
            WIDTH                       = 400
            HEIGHT                      = 150
            STYLE                       = CL_GUI_CONTROL=>WS_SYSMENU
          REPID                       =
          dynnr                       = '100'
          LIFETIME                    = lifetime_default
            TOP                         = 100
            LEFT                        = 350
            CAPTION                     = 'Error Dialog Box'
          EXCEPTIONS
            CNTL_ERROR                  = 1
            CNTL_SYSTEM_ERROR           = 2
            CREATE_ERROR                = 3
            LIFETIME_ERROR              = 4
            LIFETIME_DYNPRO_DYNPRO_LINK = 5
            EVENT_ALREADY_REGISTERED    = 6
            ERROR_REGIST_EVENT          = 7
            OTHERS                      = 8.
      ENDIF.
      SET HANDLER GR_EVENT_HANDLER->HANDLE_ON_DIALOGBOX_CLOSE FOR GR_DIALOG_CONTAINER.
      REFRESH IG_INDEX_ROWS.
      CLEAR   WG_SELECTED_ROW.
      CALL METHOD GR_ALVGRID->GET_SELECTED_ROWS
        IMPORTING
          ET_INDEX_ROWS = IG_INDEX_ROWS.
      DESCRIBE TABLE IG_INDEX_ROWS LINES L_LIN.
      IF L_LIN GT 0.
        READ TABLE IG_INDEX_ROWS INTO WG_SELECTED_ROW INDEX 1.
        READ TABLE IG_SAL INTO WG_SAL INDEX WG_SELECTED_ROW-INDEX.
        CONCATENATE 'Item' WG_SAL-POSNR 'of Sales Order' WG_SAL-VBELN 'has been selected' INTO L_TEXT
                  SEPARATED BY SPACE.
      ELSE.
        L_TEXT = 'Enter Netvalue greater than 500'.
      ENDIF.
      CALL METHOD GR_HTMLD->ADD_GAP
        EXPORTING
          WIDTH = 1.
      CALL METHOD GR_HTMLD->ADD_TEXT
        EXPORTING
          TEXT = L_TEXT.
      CALL METHOD GR_HTMLD->NEW_LINE.
    Display the data
      CALL METHOD GR_HTMLD->DISPLAY_DOCUMENT
        EXPORTING
          PARENT = GR_DIALOG_CONTAINER.
    ENDFORM.                    " DIALOG_DISPLAY

  • How to force SAVE/OPEN dialog box to appear in IE? (save output locally)

    Hi all!
    I currently have various reports in Excel format outputted in cache via the iAS browser.
    Is there a way to programatically force a SAVE/OPEN BOX to appear in IE whenever my output is spreadsheet/excel? The prompt box appears on Firefox and Opera but not in IE, i take it that IE has already been 'configured' to open excel spreadsheet automatically in the browser.
    Another spin to the question is: How do end users save the Reports output directly to their local machine; instead of having it opened in the browser or saving it in the midtier server

    I found a backdoor solution to this:
    at the URL link, i added &mimetype=application, this will force IE to show the save dialog box because it does not know what the application type is.

  • Open Model Dialog Boxes in ADF Faces

    I have a comments icon in a jspx page, which when clicked should open a model dialog box, to enter some comments and save to the database. how can it be achieved?
    Uday

    Uday,
    Have a read of the Developer's guide topic "Using Popup Dialogs" - in the ADF Developer's Guide for Forms/4GL Developers, it's section 19.3.
    John

  • How to get title in Dialog box

    How to get title in Dialog box like "Adobe® Connect™ "

    Works for me. What happened when you tried?
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    font-weight: normal;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px;
    color: #000000;
    background-color: #E6E6EE;
    overflow: auto;"
    title="this text can be pasted into the AppleScript Editor">
    tell application "Finder" to display dialog "I need ® or ™ in dialog box text" with title "I need ® or ™ in dialog box text" buttons {"Aha!"} default button 1</pre>

  • How to avoid the windows "dialog box" when we use flexprintjob class

    in the print segment
    http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf65381-7ffc.html
    it says
       printJob.start();
    This causes the operating system to display a Print dialog box.
    this  windows "dialog box" which is used to set the page size, page index, or some other page settings.
    but in my case , i can't let user see this dialog box.
        how can i avoid this "dialog box" when i call   printJob.start();
    it is my big issue ,please help to give a suggestion

      hi   how can i set the "ie" "internet explorer"  to avoid the "dialog box."  if i have to do it .
    thank you very much !

  • How to use save as dialog box in swing

    hello,
    at the time of start the application by clicking the button, i hv to give the path to save my output file, how can i used this dialog box
    thanks

    [http://java.sun.com/docs/books/tutorial/uiswing/components/filechooser.html]

  • How to develop a file dialog box in a oracle forms

    please help me its an urgent task,
    how to develop a file dialog box in a oracle 6i forms
    in html we will use <input type ="file"/> to open a dialog box,so that we can upload file to the server .similarly how to upload a file using oracle.

    For Windows there is a library that comes with forms d2kwutil.pll that contains a package win_api_dialog. use the open_file procedure.
    NOTE******** when you select a file from whatever windows directory you choose, it will change your working directory to that directory so right after that you will need to reassign your working directory back to what it originally was.
    Also, you will need to have d2kwut60.dll in the same directory as your d2kwutil.pll. Both come with Developer.
    Example code is
    v_runpath := win_api_environment.get_working_directory(TRUE);
    v_filename := win_api_dialog.open_file('Find File','C:\','*.*',TRUE, 0, TRUE);
    win_api_environment.set_working_directory(v_runpath,true);
    Hope this helps

  • How we can make CQ dialog box movable on page like sidestick?

    Hello All,
    How we can make CQ dialog box movable on page like sidestick.
    Should we have to use any property for that.
    Please tell me if any onw know this ticks.
    Thanks a ton in advance...
    Regards,
    Satish

    You could use dialogMode property configured under cq:editConfig node.
    dialogMode : floating
    http://dev.day.com/docs/en/cq/current/developing/components.html
    This should make your component dialog float and be movable.
    - Ashish

  • How to dispose the modal dialog box

    hi all
    can any one please tell me how to supress the modal dialog box.
    Means iam triggering the a new pop up (modal dialog box) after this
    when iam click ok or cancel buttons on this modal dialog box it is not returing to
    the screen from where it is tiggering. Can any one tell how to achieve this.
    what r the statements i have to write for this in the PAI.

    HI,
    in PAI u have to write like..
    CASE OK_CODE.
    WHEN 'OK'.
    UR CODE.........
    WHEN 'CANC'.
       SET SCREEN 0.
       LEAVE SCREEN.
    OR
       LEAVE TO SCREEN XXX. " UR CALLING SCREEN NUMBER
    ENDCASE.
    Pls close the thread if the problem is solved and reward to all helpful answers.
    Regards
    SAB

  • How can I get print dialog box to show accurately?

    My print dialog box shows the image too large. If I go to print it prints correctly. I have tried updating drivers and reinstalling Illustrator. It has been happening since new update to CC.

    When viewing the print settings, in the Summary List, it shows the Paper width as 9 inches rather than 8.5.
    The Navigator window shows (in my test file) 4 plus signs across the top of an 8.5 by 11 inch page.
    The Print Preview in the Print Dialog shows  only 3.  My printer is set to standard 8.5 by 11 page size.
    Everything prints perfectly in CS6 when I bring the file in.

  • How to turn off the dialog box in the Write to Spreedshee​t File

    I am saving data in a loop using "Write to Spreedsheet File". When I gave a constant path to this Vi, it was fine. However, when I gave a path defined by a global variable, it consistantly popup dialog box and asked for my choice.
    How can I turn off that dialog box?
    Thanks.

    Simply ensure that the path in the global variable is valid.
    It could be that you have a race condition and the global is read before a valid value gets written to it from elsewhere. Can you show us some code?
    LabVIEW Champion . Do more with less code and in less time .

  • How to create non-modal dialog box?

    I'm trying to create a non-modal dialog box. The purpose is to show an alarm for the user but should leave the calling VI continuing to run. I have created such a thing -- the problem is that I can't figure out how to get the dialog box to go away! It stops running but the window just hangs around. See the attached VIs and image.
    Thanks in advance for your help,
    Chad
    Attachments:
    alarm_ui.png ‏11 KB
    alarm_ui-2.vi ‏11 KB
    message_to_user.vi ‏11 KB

    Ok, I've attached the files. Thanks for looking at this.
    Chad
    Attachments:
    alarm_ui-2.vi ‏11 KB
    message_to_user.vi ‏11 KB

  • In javascript how to invoke save as dialog box ,which saves .pdf files only

    Through javascript i generated a save as dialog box. the main problem is , it is only saving .html and .doc files by default. how to restrict it to save only .pdf files.
    the code i used is
    function SaveFile(fname)
    document.execCommand('SaveAs', null, fname)
    <input type="button" value ="save" onclick="SaveFile('');">
    /**********************************************************************/

    this is actually a Java forum its slightly different from javascript
    but try this not sure if it helps
    <input type="button" value ="save" onclick="SaveFile('.pdf');">

  • How do I get a dialog box to reappear?

    I'm trying to write an application where
    1. There is an opening frame. The user can click a 'start' button which
    opens the first of a series of dialog boxes.
    2 Each of these dialog boxes has a user input field and buttons 'next' 'back' and 'cancel' , to step forward/backward through user input , or to cancel & return to the opening frame.
    3. As each dialog box opens up , the preceeding one should be hid.
    4. If the user clicks 'back' , the current box should close and the
    preceeding one should reopen.
    Straightforward enough and I've got this working at the start of the progam
    for the transition between the opening frame and the first dialog box, by
    doing this:
    in the opening frame...
    //start button..
    this.setVisible(false);
    Dialog001 d001 = new Dialog001(this,"",true);
    d001.setVisible(true);;
    and in the code in the dialog box d001, for the '<< back' button..
    void button1_actionPerformed(ActionEvent e) {
    dispose();
    super.getOwner().setVisible(true);
    *********** so far so good : everything works OK **************
    The problem is when I repeat this in the second dialog box , the
    first dialog box doesn't reappear.
    I have looked in the books and tries various things, but no good
    so far
    How do I get the previous dialog box to reappear?
    Also, how will the 'cancel' button work in the second (and subsequent)
    dialog boxes (instead of the preceeding dialog box reappearing, the
    original opening frame should reappear) ?
    Thanks in advance
    Mike
    [the jdk is 1.2.2 , OS is win98, IDE is jbuilder ver 3]

    How is this: (you can change it from Swing to AWT.)
    setVisible(false);
    int index = 0;     
    Vector v  = new Vector();
    dialog d;
    while (index != -1)
         if (index == v.size())
               v.add(new dialog(this,index));
              d = (dialog)v.get(index);
         else
              d = (dialog)v.get(index);
                  d.setVisible(true);     
         index = d.ret;
         setVisible(true);
    public class dialog extends JDialog
         JButton next = new JButton("next");
         JButton back = new JButton("back");
         JButton canc = new JButton("cancel");
         int     me;
         int     ret;
    public dialog(JFrame f,int i)
         super(f,""+i,true);
         me = i;
         getContentPane().setLayout(new GridLayout(4,0));     
         getContentPane().add(next); 
         getContentPane().add(back);
         getContentPane().add(canc);
         next.addActionListener(new ActionListener()
         {     public void actionPerformed( ActionEvent e )
              {     ret = me+1;      
                   setVisible(false);     
         back.addActionListener(new ActionListener()
         {     public void actionPerformed( ActionEvent e )
              {     ret = me-1;
                   setVisible(false);          
         canc.addActionListener(new ActionListener()
         {     public void actionPerformed( ActionEvent e )
              {     ret = -1;
                   setVisible(false);          
         getContentPane().add(new TextField("abced"));
         setBounds(100,100,100,150);
         setVisible(true);

Maybe you are looking for

  • ITunes Account Access 12.0.1

    Hello, On my mac, I updated to Yosemite. I could successfully log in to my Apple ID the initial time and then when I click on my profile and select any of the options under my account like "Wish list" or "Redeem" it makes me put in my password again.

  • Ipod Shuffle not working after trying all possible supports from Apple!!!!!

    I have an ipod shuffle and it has been working fine. It turns on and off and I can play music. Now all of a sudden I cannot connect my shuffle to my labtop through its usb port. It won't recognize it at all, it cannot be charged and I cant even attem

  • Service Broker Activation Deadlocking

    I have implemented a (slightly) modified version of conversation recycling using conversation timers and stored procedure activation from http://rusanu.com/2007/05/03/recycling-conversations/ . However it appears that, occasionally, deadlocks  occur

  • Saving a PDF in WD

    Hello, users shall have the possibility to make comments in a pdf which is displayed in a WD application. But when the user save the pdf it will be saved as a copy local on client site. Is there a possibility that the original pdf can be changed? Oth

  • New Calendar Entries Made on my BB won't sync by BB Enterprise in my Outlook 2003

    We have tried wiping the Tour, resetting the server settings, the Caledar Services in Default Services is set correctly. Someone suggested deleting Messanger.  Did that and immediately did a test new event on my handheld.  That event immediately show