How to get handle to JOptionPane dialog

Hi,
I'm working on a gui application which can generate dialogs when errors occur.
The problem I have, is the following :
Somewhere in the process, we show an info message this way :
JOptionPane.showMessageDialog((Component)parent, "This request may take up to 30 seconds...");Later on, another thread can generate an error message to inform the user that there was an error while processing the request. In this case, the first info dialog should be removed automatically (in case the user didn't close it yet).
From the thread, I have access to the parent object which is a JInternalFrame object.
Is there any way I can access the info dialog from the JInternalFrame object?
Thanks very much for your help!

check out [url http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/ProgressMonitor.html]javax.swing.ProgressMonitor which I think would fit your needs better than JOptionPane.
However, if you still want to use JOptionPane, check out it's [url http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/JOptionPane.html]API spec, which includes how to access the JDialog directly (see the bottom of the class description).

Similar Messages

  • How to get handle of a button that i created through Customisation?

    How to get handle of a button that i created through Customisation?
    I tried this in processformrequest ..failed :(
    String str2 = paramOAPageContext.getParameter("AutoDialler");
    if (str2 != null) {
    System.out.println("Inside AutoDialler Hurray");
    }

    this works well
    but can you give documentation support of whatever you are saying?
    public void processRequest(OAPageContext paramOAPageContext, OAWebBean paramOAWebBean)
    OASubmitButtonBean oasb= (OASubmitButtonBean)paramOAPageContext.getWebBeanFactory().createWebBean(paramOAPageContext,"BUTTON_SUBMIT");
    oasb.setID("xxSubmitAutoDialler");
    oasb.setUINodeName("xxSubmitAutoDialler");
    oasb.setEvent("xxSubmitAutoDialler");
    oasb.setText("xxSubmitAutoDialler");
    paramOAWebBean.addIndexedChild(oasb);
    public void processFormRequest(OAPageContext paramOAPageContext, OAWebBean paramOAWebBean)
    if ( strEvent.equals("xxSubmitAutoDialler"))
    //IMPORTANT Get this by calling the Function that loops for records.
    System.out.println("Inside processFormRequest Hurray");
    }

  • How to get a file save dialog box on button click

    Hi All,
    I have  some text  and I want to write this text in to a  file.Then I want to save this file to my local system using a file save dialog box so that I can choose the location where I want to save this file.Please tell me how can I do this in WebDynpro.
    If I cannot get the File save Dialog Box then how can I give the path while creating the new file so that it is created on my local system  as the application is running on server.
    Regards
    Rahul

    Hi Rahul,
    Sometime back I was also facing the same requirment and there are only two solutions to it one is what Armin suggested to use the file download UI element the other one you can get from this link How to write a file on our local machine using Web Dynpro
    Regards
    Sid

  • How to get an open file dialog in Forms 9i?

    Although in online help I can find the get_file_name function just like it was in Forms 6.0, at runtime this wonderful function doesn't seem to do anything.
    Furthermore, there is no more d2kwutil.pll, nor d2kwutil.dll.
    How could I get an open file dialog?

    Hi,
    actually this functionality does not work. The reason for this is that Forms9i is Web only and there is no functionality downloaded with the generic Java Applet. For the moment I filed an enhancement request to have this on our radar. Meanwhile, if you need thi sfunctionality you can help yourself by writing a PJC that opens a dialog and performs the action that you want to.
    Frank
    Forms Product Management

  • How to get handle to all HSSF worksheets

    Hi Friends,
    Is there any way we can get handle to all the worksheets in the excel file using apache POI classes..
    For eg:
    If there are 10 worksheets, how to get all the sheet names without using
    HSSFSheet sheet = wb.getSheetAt(0)
    Thanks and Regards,
    JG

    Hi masijade,
    I was not aware of the property getNumberOfSheets.
    Thanks for notifying me of that property.
    and this will property will resolve my issue.
    Thanks and Regards,
    JG

  • How to get, handle and check web service response?

    Hello All!
    We test web services and try to use e-Tester for this.
    We have some problems with validation of service response. Maybe somebody can help or advice us?
    Service method returns the list of Cards (total is about 300 items) with attributes.
    Below is the sample of one card properties.
    - <Cards>
    - <UserCard>
    - <characteristics>
    - <item>
    <Name>ARM</Name>
    <Value>78</Value>
    </item>
    - <item>
    <Name>BAT</Name>
    <Value>40</Value>
    </item>
    - <item>
    <Name>SPD</Name>
    <Value>30</Value>
    </item>
    - <item>
    <Name>STR</Name>
    <Value>40</Value>
    </item>
    </characteristics>
    <ID>1</ID>
    <FirstName>A.J.</FirstName>
    <LastName>Burnett</LastName>
    <PlayerName>A.J. Burnett</PlayerName>
    - <Team>
    <Name>Blue Jays</Name>
    <City>Toronto</City>
    </Team>
    <cardid>1</cardid>
    - <Flags>
    <IsFavorite>false</IsFavorite>
    <IsForPosters>false</IsForPosters>
    <IsForTrade>false</IsForTrade>
    <IsToppCard>false</IsToppCard>
    </Flags>
    <Count>0</Count>
    </UserCard>
    + <UserCard>
    + <UserCard>
    + <UserCard>
    In one test case we need to check the state of Count property (0 or 1) for all cards, count the quantity of cards with Count=1 and check that it equals to 8.
    So the question is how to get the service request to the VBA for analyzing and verification?
    Thanks a lot!

    Have any other ideas?

  • How to get Title from JOptionPane

    Hi,
    I would like to get Title from a JOptionPane, is there any method to get the same? for example, a message dialog has "Error" as title how can I get it?
    Thanks in advance.
    -Jose

    Hi Jose,
    Do you mean you want to set the title? If so you can specify the title in one of the many static methods available ie.
    JOptionPane.showMessageDialog(parent, "some message", "some title", JOptionPane.ERROR_MESSAGE);
    Otherwise if you are trying to get the title try..
    String title = "some title";
    JOptionPane.showMessageDialog(parent, "some message", title , JOptionPane.ERROR_MESSAGE);
    then you can write some other code using title.
    Hope this helps Jose,
    regards Darren.

  • How to get handle to a MST bean for a particular row in an advanced table

    Hi
    Requirement:
    My advanced table has 2 columns, the 1st one has a LOV and the 2nd one is a switcher which toggles from LOV to MST depending on the value in the 1st column.
    Implementation Steps:
    1) Trap LOV event in 1st column and pass row index to the AM
    2) Get the VO row from the row index (EVENT_SOURCE_ROW_REFERENCE), set the switcher attribute to MST/LOV depending on Business Logic
    3) Get the view attribute value of the 2nd column (to which LOV/MST is mapped).
    My LOV/MST gets rendered correctly on the page. However, when the LOV renders in the 2nd column, the view attribute is correctly populated in the LOV. But the MST renders with no value.
    I understand that the MST loses value on form submission and that this value needs to be set in the PR of the CO. For that how do I get a handle to the MST bean of the particular row?
    This is urgent!!
    Thanks
    Ritu

    Pointers?
    Anyway I can make the MST in the row return the correct view attribute?

  • How to get handle on currently used socket (JDBC)

    Hi all,
    I am trying to get the handle of the socket I am using for an Oracle JDBC connection. I created an instance of a Socket bound to the server and the port. However, I am not sure exaclt how to go about BINDING the socket to the JDBC call I am making.
    THanks for any help.
    Ryan

    Same here. Ive never seen a connection blow up like this. I think we may have found the problem. We are using an OracleXMLQuery object and thought we were hitting an 8.1.7 database....come to find out we are hitting an 8.1.5 database! I think this will resolve the problem (pointing to a newer database).
    Thanks for the help.
    Ryan

  • How to get handle of go, clear button in query region.

    Hi: I have a search page built using query region, I need to make an API (method) call on clicking on "Go" button.
    I tried the following as found in OA Framework discussion forum, but observed that "go" is always true in processFormRequest method and always false in processRequest method.
    I did check the methods of OASubmitButtonBean also, but unable to find out how exactly I get "the handle of go button click event" in this case to handle my requirement.
    Any idea if its possible or not, and if yes, then how?
    OAQueryBean queryBean = (OAQueryBean)webBean.findChildRecursive("QueryRN");
    String idGo = queryBean.getGoButtonName();
    OASubmitButtonBean go = (OASubmitButtonBean)queryBean.findChildRecursive(idGo );
    I did also try to add my buttons in the query region, which work as I require, but in that case I need to hide existing go, clear buttons (which are added by default) in query region. That also doesn't work, as in processRequest method "go" is always false, and in processFormRequest I cannot call "go.setRendered(false);".
    Also, button should be disabled even on first loading of page also. Can anyone help?
    Regards,
    Anvita.

    modified code further as follows --
    OAQueryBean queryBean = (OAQueryBean)webBean.findIndexedChildRecursive("QueryRN");
    String idClear = queryBean.getClearButtonName();
    OASubmitButtonBean clear = (OASubmitButtonBean)queryBean.findChildRecursive(idClear);
    String idGo = queryBean.getGoButtonName();
    OASubmitButtonBean go = (OASubmitButtonBean)queryBean.findChildRecursive(idGo);
    System.out.println("I wish it works in +++++++++++++++++++++++++ " + idClear + " xxx " + idGo);
    if (pageContext.getParameter("idGo") != null)
    System.out.println("I wish it works in GO +++++++++++++++++++++++++ ");
    if (pageContext.getParameter("idClear") != null)
    System.out.println("I wish it works in Clear +++++++++++++++++++++++++ ");
    if (pageContext.getParameter("go") != null)
    System.out.println("I wish it works in GO button +++++++++++++++++++++++++ ");
    if (pageContext.getParameter("clear") != null)
    System.out.println("I wish it works in Clear button +++++++++++++++++++++++++ ");
    if (go != null)
    System.out.println("I wish it works in GO button direct +++++++++++++++++++++++++ ");
    if (clear != null)
    System.out.println("I wish it works in Clear button direct +++++++++++++++++++++++++ ");
    =============================================
    and output print is always the following even if i click on button or not (like select some LOV, or perform PPR action) .. hence it doesn't allow me to catch go button click event .. Please advice ..
    output PRINT --
    I wish it works in +++++++++++++++++++++++++ clearButton xxx customizeSubmitButton
    I wish it works in GO button direct +++++++++++++++++++++++++
    I wish it works in Clear button direct +++++++++++++++++++++++++

  • How to get Handle for a Image Control in WPF

     I have to read an image from a camera dll function.
     the function takes  a handle of the UI element to display the images.
    I was able to get the image on the Windows picturebox by using its handle property.
    But when i try to do the same thing in WPF, i found problem to do so, as WPF has a single handle
    for all controls.
    if i pass that handle  it will display the image on the Window itself.
    but i want it on Image box.
    so my question is how can i assign the WPF handle i have to the Image box or how can i get the
    handle of the Image box.
    I am aware that controls dont have handles in WPF.
    but is it not possible to get the handle using interop?
    please help me its really urgent.nishant singh,Bangalore

    Hi,
    You can try this:
    HwndSource hwndSource = PresentationSource.FromVisual(YourImageControl) as HwndSource;  
    if (hwndSource != null)  
        handle = hwndSource.Handle;  
    Let me know if it works !
    HTH
    ThomasThomas Lebrun [MVP] - WPF/LINQ: http://blog.developpeur.org/tom - http://morpheus.developpez.com

  • How to get the file name dialog on the selection screen

    Hi All
    I have a selection screen in which there is a parameter where I need to enter file name. Instead of typing filename in the parameter I would like to give a path from presentation server ( I am downloading Data to presentation server ).
    How to achive this functionality in case of a parameter on the selection screen. I need to have File open Dialog box like Windows here and then it should show the filename and it's path in this parameter after selectiong from the dialog box.
    Amol

    Hi..,
    Use the function module <b>F4_FILENAME</b> or <b>WS_FILENAME_GET</b> in the event
    <b>AT SELECTION-SCREEN ON VALUE REQUEST FOR P_FILE.</b>
    Parameters p_file type rlgrap-filename.
                AT SELECTION-SCREEN ON VALUE REQUEST EVENT            
    at selection-screen on value-request for p_file.
      perform value_request.
    *&      Form  value_request
          This subroutine proposes the possible input values             *
    There are no interface parameters to be passed to this subroutine.  *
    form value_request.
      call function 'WS_FILENAME_GET'
       importing
         filename               = p_file
       exceptions
         inv_winsys             = 1
         no_batch               = 2
         selection_cancel       = 3
         selection_error        = 4
         others                 = 5.
      check sy-subrc eq 0.
    endform.              
    Reward all helpful answers !!
    sai ramesh

  • How to get save file as dialog?

    Hi,
      I want to copy the file and save it as another the file using Save As file dialog box. So I searched this forum and found this artical. But the activeX control used in this vi. i.e.MSComDlg.ICommonDialog could not be loaded in my system(as shown when I open the vi, downloaded from above link). What might be reason for it? Or does NI provide any other method/vi to display Save As file dialog.
    Thanks in advance.
    Regards:-
    Mike

    You can not force the user to enter a "defined" file name. If you use the standard file dialog, you can always get an "invalid" result.
    To solve your problems, I have two solutions in mind.
    1. If you keep the file dialog, you have to check the resulting path for its ending. According to this check either add ".csv" or replace the ending with ".csv". Because if the user enters "filename.txt" in the filename control, the file has ".txt" ad ending.
    2. You could also create a special file dialog on your own with a path control to browse to an existing directory and a string control to enter a filename. You can set the pathcontrol to just browse for a directory. The input of the string control can be checked for anything - so for instance you could check if there are blanks in the filename or if the user entered an ending. Then you could notify the user via messagebox to enter a valid filename. The ending can be added automatically, so you always have a .csv ending.
    Using LV8.0
    Don't be afraid to rate a good answer...

  • How to get rid of OK dialog on phone after Sync

    I have syncing via Bluetooth to my 6230i working fine, but after every sync, the phone shows a dialog message saying "Calendar: OK Notes: OK" and I have to press OK.
    Is there a way of disabling this? If I don't click OK, the phone won't let me sync (and annoys me). I want to sync at least once a day, automatically. Using bluetooth, the phone gets disconnect and re-connected several times a day whenever I leave my desk - I don't really want to have to pull out my phone and select OK every time I sit down.
    versions:
    PC Suite: 6.70.22
    Belkin USB Bluetooth adapter
    Phone: 6230i v03.40 23-05-05

    Sorry to tell you that it is not possible to disable that "OK" pressing...

  • How to get mac to open dialog box before opening specific program?

    Hi
    I was wondering if there is a way have my computer ask me before opening a spacfic program. I have a program with a limited number of start-ups (demo) and would like a safe-gaurd from opening it unnesscaraly when clicking through files. Can this sort of dialog-box function be eneabled?

    Try:
    My mac keeps on asking me for keychain passwords ...which I have either forgotten or never used
    Frequently asked questions about iCloud Keychain

Maybe you are looking for

  • Debugging Adobe Bridge

    Hi I'm currently implementing a CMIS server as my bachelor thesis. I am using adobe drive 4 to connect the creative suite 6 with my cmis repository. This works pretty well, but I have one problem with adobe bridge, which I already described in this t

  • Problem with mpseal.exe referencing an MPB file

    Is the mpseal.exe that came with scom 2012 R2 (dated 9/6/2013) capable of sealing a management pack that contains references to management packs that are included as only MPB files? I get a missing reference error when sealing a management pack refer

  • BPEL Fault Handling Framework, default Action to send Notification

    All, I'm using SOA Suite 11g R1 Is there a way to send (email) Notification without Java coding in the BPEL Fault Handling Framework ? I would like to, when catching a fault in the Fault Handling Framework (remotFault/bindingFault) -> send a Notifica

  • Can't archive nexus 5010 configs (LMS 3.2)

    Using LMS 3.2 I can't archive configs from our Nexus 5010 ( 4.2(1)N1(1) ) devices . I have installed the   necessary device package Nexus.RME431.v2-4.zip. Following error occures: *** Device Details for                          gf02na50050p          

  • How to run a sample Jolt client

    Can any one explain me how to run a sample jolt client. Iam trying to run the following jolt client code ToUpper.java at the command prompt but I am getting the following error.I am getting the same error when i run the Jrepository Applet RE.html. D: