How can i prevent the resizing of JOptionPane error message box? Urgent plz

hi all,
i have an application which display error dialog box at many insatnces in the application.
I use JOptionPane.showMessageDialog to display the errors.
Now the problem is the error box is resizable. But i want to prevent the error box from resizing.
how can i achieve this?
thanx,
-Soni

i used the same code and i got it working correctly...
thanx a lot fot it...
now i have one more problem with it.
Actually i created a new class 'ErrorDialog' and the function showErrorDialog() inside it.
now i want the option YES_NO_OPTION and the function sayshowMsgDialog() returning int value indicating the option selected from the dialog box.
I tried it with following code
public
static
int
confirmDialog( String message_in, Component parent_in, String title_in,
int messageType_in )
try
JOptionPane pane = new JOptionPane( message_in, messageType_in,
JOptionPane.YES_NO_OPTION );
JDialog dialog = pane.createDialog( parent_in, title_in );
dialog.setResizable( false );
dialog.show();
int optionType = -1;
try
optionType = ( ( Integer )( pane.getValue() ) ).intValue();
catch( Exception ee )
optionType = -1;
dialog.dispose();
return optionType;
catch( Exception e )
e.printStackTrace();
but, since return is after dispose() it is throwing an error 'missing return value'
can i get some kind of solution for this?
waiting eagerly...........
-Soni

Similar Messages

  • How can I prevent "the connection has timed out" message.

    Sorry, this is a duplicate. Can't determine how to delete. Mike.
    Frequently takes a full minute to get to first page. Happens on IE as well as FF, also on my email client. After an hour or so, Thunderbird can no longer reach my email,with an error. To recover I have to reboot.
    Occasionally "try again" button works on the "connection has timed out" message
    Some tools which access the web take a long time to “update”,
    is hard to recreate have not proven or disproven the firewall is a problem. Don't think WinXP firewall is on.
    Tried refresh of Adobe Flash Player per suggestion in Firefox Support forum, no help.

    Hello there, FloridaAce.
    The following Knowledge Base article offers up some practical first steps for troubleshooting Wi-Fi connectivity issues with an iOS device:
    iOS: Troubleshooting Wi-Fi networks and connections
    If going through the initial recommended steps doesn't yield a resolution to your issue, you may want to run through this section as well:
    Wi-Fi disconnects or signal strength is less than expected
    Move closer to the Wi-Fi router (access point).
    Check for sources of potential interference.
    Remove any case, stand, or other accessories from your iOS device and see if signal strength improves.
    Reset network settings by tapping Settings > General > Reset > Reset Network Settings. Note: This will reset all network settings including
    previously connected Wi-Fi networks and passwords
    recently used Bluetooth accessories
    VPN and APN settings
    Thanks for reaching out to Apple Support Communities.
    Cheers,
    Pedro.

  • How can I prevent the flushing of the buffer until the playing is finished in AS3?

    How can I prevent the flushing of the buffer until the playing is finished in AS3?
    Is it possible?
    The buffer is emptied and flushed 10-11 seconds before the real end of the flv file.
    The file is locally saved and I stream it though crtmp server.
    I cannot seek the last 10 seconds because of empty buffer. How can I stop flash from flushing the buffer at end?

    i used the same code and i got it working correctly...
    thanx a lot fot it...
    now i have one more problem with it.
    Actually i created a new class 'ErrorDialog' and the function showErrorDialog() inside it.
    now i want the option YES_NO_OPTION and the function sayshowMsgDialog() returning int value indicating the option selected from the dialog box.
    I tried it with following code
    public
    static
    int
    confirmDialog( String message_in, Component parent_in, String title_in,
    int messageType_in )
    try
    JOptionPane pane = new JOptionPane( message_in, messageType_in,
    JOptionPane.YES_NO_OPTION );
    JDialog dialog = pane.createDialog( parent_in, title_in );
    dialog.setResizable( false );
    dialog.show();
    int optionType = -1;
    try
    optionType = ( ( Integer )( pane.getValue() ) ).intValue();
    catch( Exception ee )
    optionType = -1;
    dialog.dispose();
    return optionType;
    catch( Exception e )
    e.printStackTrace();
    but, since return is after dispose() it is throwing an error 'missing return value'
    can i get some kind of solution for this?
    waiting eagerly...........
    -Soni

  • I'm using "window.open()" to show one Calendar in a popup window. I can see that the popup is re-sizable. How can I prevent the user from re-sizing the popup?

    I'm using "window.open()" to show one Calendar in a popup window. I can see that the popup is re-sizable. How can I prevent the user from re-sizing the popup? I have tried "resizable=yes|no|1|0" and that seems to be not working.

    You can't prevent users from resizing a pop-up.
    *https://developer.mozilla.org/en-US/docs/Web/API/window.open

  • How can we  prevent the PO while creating the sales order

    Hi All,
    How can we prevent the PO number while creating sales order with existing PO. I have checked the box in sales document type as A but still im able to create sales order with same PO.
    Thanks in advance.
    Naveen

    Hi
    In VOV8 check the box
    Check Purchase Order Number
    The purpose of this field is to check for duplicate
    purchase order (PO) numbers during sales order entry. When you select A in
    this field, SAP gives a warning message during sales order creation if another sales
    document for same customer with the same PO number exists already. Leave this
    field blank if you do not want SAP to check for duplicate PO numbers.
    regards
    Prashanth

  • Have Operating System 10.6.8, Mail Program 4.6.  How can I prevent the next email in the que from automatically opening after I act on the previous email ? It creates big organizational problems for me. My computer changes this mode from self opening to m

    Have Operating System 10.6.8, Mail Program 4.6.
    How can I prevent the next email in the que from automatically opening after I act on the previous email ? It creates big organizational problems for me. My computer changes this mode from self opening to manually opening every few month with no ? action from me.
    Help

    Have Operating System 10.6.8, Mail Program 4.6.
    How can I prevent the next email in the que from automatically opening after I act on the previous email ? It creates big organizational problems for me. My computer changes this mode from self opening to manually opening every few month with no ? action from me.
    Help

  • How can you prevent the mac book pro from unexpectedly shutting off and beeping three times repeatedly?

    How can you prevent the mac book pro from unexpectedly shutting off and beeping three times repeatedly?

    The three beeps are an indication of a hardware problem. Power On Self-Test Beep Definition - Part 2 - Apple Support

  • How can I prevent the open/save file confirmation window popup ? Mine is currently set for "always do this action" but I still get the popup.

    Whenever I "export" a QIF file from my bank I get a File Action confirmation window popup. I have the correct application selected and I have it selected to "open" and "always do this action" but the popup always pops.
    I have checked the applications tab and the correct application is selected.
    How can I prevent the confirmation popup window please ?

    Cheers for the reply.
    I have deleted the rdf file but no difference. I still get the opening file box popup.
    From the resetting download actions link. Both lines in the about:config are missing.
    I have also tried switching the download option for the qif file to use a csr file but that also opens the confirmation box.
    I pulled this from the rdf file
    <RDF:Description RDF:about="urn:mimetype:handler:text/x-qif"
    NC:alwaysAsk="false"
    NC:saveToDisk="false"
    NC:useSystemDefault="false"
    NC:handleInternal="false">
    <NC:externalApplication RDF:resource="urn:mimetype:externalApplication:text/x-qif"/>
    <NC:possibleApplication RDF:resource="urn:handler:local:C:\Program Files\Microsoft Money\System\msmoney.exe"/>
    </RDF:Description>
    <RDF:Description RDF:about="urn:scheme:webcal"
    NC:value="webcal">
    <NC:handlerProp RDF:resource="urn:scheme:handler:webcal"/>
    </RDF:Description>
    <RDF:Description RDF:about="urn:mimetype:externalApplication:text/x-qif"
    NC:path="C:\Program Files\Microsoft Money\System\msmoney.exe"
    NC:prettyName="msmoney.exe" />
    Not sure if that helps.
    Thanks again for the reply

  • When inserting a checkbox, how can I prevent the note box from appearing?

    To all,
    After -reluctantly- "upgrading" from Acrobat Pro 7 to Pro X I find this new version absolutely maddening.
    Pro 7's features were easy to find in the tool bar. Now in Pro X everything is "dumbed down" with everything "nested" into each other...
    But I whine and digress from my problem:
    QUESTION:
    When inserting a checkbox, how can I prevent the note box from appearing?
    With every insertion of a checkbox onto a form, a "notebox" appears.
    Thank you,
    Matt

    As you can see, when I add a checkmark to a page/form, a "note" is automatically added also. In my old Acrobat v. 7, this did not happen.
    Any ideas on how I can set Acrobat Pro X to NOT include this note?
    Thank you,
    Matt

  • When used as an Activex control in windows How can I prevent the "Q" logo from appearing between streaming videos?

    When used as an Activex control in windows How can I prevent the "Q" logo from appearing between streaming videos?

    Hello Cgifford,
    Welcome to National Instruments Forums.
    To output your signal to the PFI lines,
    you can use external connectios between OUT0 and PFI lines. You can also use
    the backplane to do so by routing into the same RTSI line.
    1)
    On the SCOPE and FGEN, the name of the
    terminals are actually “PXI Trigger Line x/RTSIx” but on the 6602 you might
    need to route the signal using the property:
    You can also use the DAQmx route signal which perform the same opperation.
    2)
    This will depend on the frequency of
    your pulse train. If this is lower than about 10 ms, then you can probably
    place this on a loop and start and stop the acquisition every time. If the
    frequency is higher than this, you will have to use:
    -       Scripting on the FGEN side (read more)
    -       MultiRecord Fetch (more information in the scope help file
    section “Acquisition Functions Reading versus Fetching”).
    3)
    The short answer is yes. The longer one
    might depend on how tight you need the synchronization to be (us, ns, ps). For
    very tight synchronization, you should look into here.
    Message Edited by Yardov on 06-18-2007 03:14 PM
    Gerardo O.
    RF Systems Engineering
    National Instruments
    Attachments:
    property.JPG ‏7 KB

  • How can I get the "Open" and "Save As" dialog boxes to open at larger than their default size?

    How can I get the "Open" and "Save As" dialog boxes to open at larger than their default size?  I would like them to open at the size they were previously resized like they used to in previous operating systems.  They currently open at a very small size and the first colum is only a few letters wide necessitating a resize practically every time one wants to use it.  Any help would be appreciated.

    hi Prasanth,
    select werks matnr from ZVSCHDRUN into table it_plant.
    sort it_plant by matnr werks.
    select
            vbeln
            posnr
            matnr
            werks
            erdat
            kbmeng
            vrkme
            from vbap
            into table it_vbap
            for all entries in it_plant
            where matnr = it_plant-matnr and
                  werks = it_plant-werks.
    and again i have to write one more select query for vbup.
    am i right?

  • I need to reinstall my Linux Mint, therfore also Thunderbird. How can I save the adresses and all my messages (copy and past in new Thunderbird after install)

    I need to reinstall my Linux Mint 17 mate, therfore also Thunderbird. How can I save the adresses and all my messages (copy and past in new Thunderbird after install)?

    Thank you for your suggestion. I have installed Linux Mint 17.1 with the Thunderbird and everything I had installed was still there. So, I didn´t need these mesures.
    Thanks anyway.

  • How can we execute the BDC session in error mode through se38 programme

    Dear Experts,
    How can we execute the BDC session in error mode through se38 programme....
    we can execute the session in the below 2 ways
    1) Through SM35 we can process the session manually in foreground/Error mode or Background also.
    2) through RSBDCSUB (standared Program) we can process the session in back ground.
    But i want to process the session in foreground or Error mode..Do we have any standared program for process the session in foreground or error mode.
    Please suggest.
    Regards,
    Bussa.

    Hi,
    SAP was smart enough to provide this little program: RSBDCCTU
    Sandra
    Edited by: Sandra Rossi, 15 minutes later
    Maybe the answer to your question is just to use CALL TRANSACTION ... USING ... (see the example in RSBDCCTU). You can also generate such a program using transaction SHDB

  • TS3694 how can i resolve the issue of this error 1015?

    how can i resolve the issue of this error 1015?

    Google it. You can not get help for your jailbroken phone here.

  • HT5129 How can I stop the "MobilMe has been discontinued" message?

    I don't have any published albums; how can I stop the "MobilMe has been discontinued" message coming up all the time?

    Bill,
    Go to iPhoto>Preferences...>Accounts...and remove the MobileMe account. Then go to System Preferences...>MobileMe, and sign out.

Maybe you are looking for