How to bring to front created message dialog?

Hello,
I don't know if this is correct way to open popup window in JSF, but I do it like that:
if (!((String)passwordField.getText()).equals(
(String)confirmPasswordField.getText())) {
javax.swing.JOptionPane infoDialog = new javax.swing.JOptionPane();
infoDialog.grabFocus();
infoDialog.showMessageDialog(new javax.swing.JFrame(),
"Password and Confirm Password fields must be equal",
"Information", javax.swing.JOptionPane.OK_OPTION);
return null;
Window is opening, but is covered under other windows, how to bring it to front?

you mean I have to write a code in paintComponent()
for painting the other one first, I write a seperate
method to implement this functionNo, I mean just that. It's like drawing on a piece of paper. Paint one thing first, and the one that gets "on top" last. Save all your shapes in an array, paint them sequentially, and reorder the array as needed, if one should move from the background to the foreground.

Similar Messages

  • How to make the length of Message Dialog follows the length of text

    Hi all.
    I am making a Message Dialog From JOptionPane because i do not want to use some static methods of JOptionPane (JOptionPane.Show ...)
    My source codes following :
    public static void showMessageDialog(String message) {
              JOptionPane optionPane = new JOptionPane();
              JDialog dialog = optionPane.createDialog(null, "Message");
              optionPane.setMessage(message);
              optionPane.setMessageType(JOptionPane.INFORMATION_MESSAGE);
              JButton btnOk = new JButton("OK");
              optionPane.setOptions(new Object[] { btnOk });
              dialog.setVisible(true);
    }It runs well but having a problem. When message is a long text --> JDialog can not show all text, dialog's length does not resize automatically following message's length.
    Have a the way to make it ? How to solve ?
    Thanks in advance !
    Diego
    Edited by: ThuCT on Feb 1, 2010 3:28 AM

    Add a dialog.pack() call. See SSCCE below.
    i do not want to use some static methods of JOptionPane (JOptionPane.Show ...)Why? In this case the built-in static method handles the size as expected.
    public class TestJOptionPaneSizeAdaptsToMessageLength {
       public static void main(String... args) {
           String message = "This is a very long message, I say long but really it is a very very long one, and when I say long I do mean it!!! ";
           message += message;
           message += message;
           message += message;
           showMessageDialog(message);
    //       showMessageDialogUsingStaticJOptionPaneMethod(message);
       public static void showMessageDialog(String message) {
            JOptionPane optionPane = new JOptionPane();
            JDialog dialog = optionPane.createDialog(null, "Message");
            optionPane.setMessage(message);
            optionPane.setMessageType(JOptionPane.INFORMATION_MESSAGE);
            JButton btnOk = new JButton("OK");
            optionPane.setOptions(new Object[] { btnOk });
            dialog.pack();
            dialog.setVisible(true);
       public static void showMessageDialogUsingStaticJOptionPaneMethod(String message) {
            JOptionPane.showMessageDialog(null, message);
    }Edited by: jduprez on Feb 1, 2010 11:39 AM
    I have to admit, I am a zealous fan of the built-in JOptionPane.showXxx methods :o)

  • How can i test after creating Message mapping transformations

    Hi guys,
    How can i test my transformation after creation of message mapping in Integration Repository.
    Pleae expain step by step procedure
    Thanks & Regards.,
    Pushparaju.B

    Hi,
    1. If you just want to test the mapping --In message Mapping there are three tab, the second one being hte Test tAb. So u can pu the values in the left side XML and do test.
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/e3072e65f04445a010847aa970b68b/content.htm
    2. You can do the Testing from Interface mapping also. There is a Test tab there too.
    3. If you have created the whole scnerio then you can do testing from Integration directory:
    http://help.sap.com/saphelp_nw04/helpdata/en/6b/874a4273bb3830e10000000a155106/content.htm
    Regards
    Vijaya

  • Modifying Create User Dialog to enforce password rules

    How do I modify the Create User dialog, so that the user is forced to select a password with atleast one lowercase, one uppercase letter and one numeric letter. As of now, there is no such restrictions.

    ksk259,
    I've found the answer to part of our issue - making the email field required. To do so, you have to:
    Go to /var/clientlibs/libs/cq/security/widgets.js and find the createUser function
    Add "allowBlank":false, under the "fieldLabel":CQ.I18n.getMessage("Mail") section.
    As for the password security, we've made some progress on the password validation as well.  You can add the in-dialog error string by adding a new vtype/return message.
    Go to /libs/cq/ui/widgets/source/ext/override/locale/ext-lang-cq.js and add pwdText: CQ.I18n.getMessage('Your Error String Here') under CQ.Ext.form.VTypes
    In the widgets.js above, add "vtype":"pwdText", under the "fieldLabel":CQ.I18n.getMessage("Password") section
    Write your function in JavaScript that does the logic you need it to do.
    What we are still unclear about is where exactly do we put this JavaScript function and how do we call it from the New User Dialog box.  In the widgets.js file, the check passwords function is local to the CreateUser function - is this best place for a validation function?  I don't understand exactly how the email validation function is working - I see the error message , but where is the code that actually performs the validation?
    Can someone from Adobe chime in here?

  • How to create an dialog "SAPoffice express info" in ABAP?

    Hi all,
    We would like to create a dialog "SAPoffice express info" to remind the relevant user that he must immediately check his new SAP mail in inbox.
    We see SAP system sometimes send a dialog "SAPoffice express inof" for this same purpose. For example:
    "Express document "Cannot be sent: Send Mail from ABAP Program." received from author "SAPUSER"".
    So we would like to create a dialog "SAPoffice express info" for our cas.
    If anyone know how to create a dialog "SAPoffice express info" in ABAP, please help us?
    Thanks a lot,
    Vinh vo

    Try with function module  SO_NEW_DOCUMENT_SEND_API1. using this you can send express message to sap office.
    RECEIVERS-REC_TYPE = 'B'
    RECEIVERS-REC_ID       = (user id)  " SAP user id for whom you want to send
    RECEIVERS-EXPRESS    'X'        

  • How to create conditional dialog box

    Hi Everyone
    I am creating a database application in APEX 4.0. In that application a page requires a dialog box, which has to appear when a user clicks on Submit button.
    It has to consider validations and appear after validations and submit button is clicked. Here the Submit button submits the entire page after validations by updating the database table.
    Please help me out how to create a dialog box which has to appear by the click of Submit button.
    Thanks in advance
    Regards
    Sandeep

    Hi Kiran
    Thanks for responding,
    Sorry for providing the complete details.
    Provided link is much more helpful, but its not meeting my needs. My requirement is to just show a popup box after the user clicks on submit button.
    Saying 'Thank you for answering' if he is done with all questions or if he has more questions to answer pop up with different message 'You have more questions to answer'.
    In both the cases page as to get submitted when clicked on Submit button.
    Thanks in advance
    Regards
    Sandeep

  • How do I use multiple messages with CAN CREATE MESSAGE?

    I'm an old hand at DAQ, but new to CAN.
    I need to configure the CAN interface without using MAX or a DBC file directly (because i want the user to configure EVERYTHING in one place, and MAX doesn't handle my other channels).
    I can provide the message IDs, channel start bits, etc., etc., by importing a DBC file myself.
    So I'm looking at the CAN CREATE MESSAGE vi. I can make it work, using a single message, and a few channels on that message.
    But how do I add another message to that task? Or do I create another task to handle a different message?
    What's the difference between CAN CREATE MESSAGE and CAN CREATE MESSAGEex? I can't find any in the help docs.
    Steve Bird
    Culverson Software - Elegant software that is a pleasure to use.
    Culverson.com
    Blog for (mostly LabVIEW) programmers: Tips And Tricks

    you can’t programmatically add messages/channels to an already existing task
    So I can't create a task with more than one message, and I can't add a message to an existing task.
    That sounds like I have to have a separate task for each message I want. That means separate READ operations at DAQ time. I hope the overhead doesn't cost too much (I'm doing a thousand other things at DAQ time).
    I have an RT card in the system I'm designing. It's only using about 5% of the CPU time (PID controlling an engine). Will NI-CAN stuff work on the RT? How do I physically connect it? Is CAN just RS-232 at fast baud rates, or are there more electrical differences?
    Steve Bird
    Culverson Software - Elegant software that is a pleasure to use.
    Culverson.com
    Blog for (mostly LabVIEW) programmers: Tips And Tricks

  • Many years ago synced iCal with Microsoft program. Since installing Lion whenever I try to create an event in iCal it flashes up message "Unable to open Microsoft sync services Power PC applications no longer supported." How do I get rid of message?

    Many years ago synced iCal with Microsoft program. Since installing Lion whenever I try to create an event in iCal it flashes up message "Unable to open Microsoft sync services Power PC applications no longer supported." How do I get rid of message?

    Lion no longer supports PowerPC apps. If this is Microsoft Office 2008 (Entourage 2008) then you should disable the syncing services.  (I don't have Office 2008 installed anymore so I don't know exactly what it's called anymore.)  If you have Microsoft Office 2004 or earlier, then it can't be run on Lion at all since Lion removed Rosetta, which is what allowed a PPC app to run on an Intel based Mac.
    Also, I believe Microsoft removed sync services from the current Outlook 2011 (which replaces Entourage) so even upgrading to a newer version of Microsoft Office will not get you back that calendar sync feature.  Supposedly Microsoft is working on a new syncing system, but I wouldn't hold my breath.

  • How to find a user who created message in satelite system ?

    hi all,
    Does anybody know how to find a user who created message in satelite system, but when there is no business partner created for him in Solman ? In tx crm_dno_monitro, crmd_order or dnotifwl  there isn`t any information. Is there any Tx or something where i can check it ?
    Regards,
    M.

    Hi,
    BP should ne maintained for the user in satellite system as a identification in solman system.
    how you are trying to create a message in satellite system..
    if you are using help-> create support message then, you can get the message log details on the table BCOS_PROT.
    please update us
    Thanks,
    Jansi
    Edited by: shivjansi on Jan 25, 2012 7:44 PM

  • I am running OS 10.6.8 and Safari 5.1.  Option-Command-Escape now brings up Front Row.  How can this be fixed?

    I am running OS 10.6.8 and Safari 5.1.  Option-Command-Escape now brings up Front Row.  How can this be fixed?
    Also, trying to copy portions of articles from Safari (5.1) to MS Word now results in the twirling ball. Any solutions?

    Try using the other Option (Alt) key. The reason I suggest that - the real command combo for Front Row is Command-Escape; yet yours was being activated when you pressed Command-Option-Escape. That would indicate that Finder was not responding to the inclusion of Option in the key combo. The simplest explanation for that would be that the Option key you are using is not working for some reason.
    One other 'simple' possibility - just to make sure (in case you are using a non-Apple keyboard), Option is the key adjacent to each Command key.

  • How to change the Button content as CamelCasing in Windows phone 8.1 Message dialog

    This was already raised in
    Stack over flow, While showing the native Message dialog in Windows phone, i cant change the captions as camel case of command buttons. Is this a bug with windows phone 8.1(WinRT) are is there any workaround to fix this issue?
    Sankar

    This isn't recommended and violates the system style.
    If you want a custom dialog you need to use a different control. The MessageDialog always lower cases the buttons to match the system style and is not generally customizable.
    If you use a ContentDialog you can customize it fairly extensively, and it doesn't try to fix the case of its buttons. You'll probably want to create your own ContentDialog class (there's a template under Add.New Item...) with your desired contents, but here's
    a quick content-free example:
    ContentDialog cd = new ContentDialog();
    cd.Title = "My Title";
    cd.PrimaryButtonText = "CoNtInUe";
    cd.SecondaryButtonText = "sToP";
    await cd.ShowAsync();
    Also note that the guidelines
    for message dialogs suggest using clear and specific verbs rather than generic OK/Cancel.

  • How to create messages in process chains?

    Dear Gurus,
    I want to use the alert system in the process chains.  like when one process fails i have to receive the message on my mail or as an SMS on my mobile. 
    I tried the same thing with one of my process chain.  When i right click one of my process in my process chain i will get the create message option.  But my problem is i dont know how to use that option.  If u have any solutions or any material please try to send me to the following ID <b>[email protected]</b>
    Thanks in advance
    Mohan Kumar

    Hi,
    You can also send messages to an application process of the chain, depending on the success or failure of the process.
    1.       From the context menu of a process, create an additional process variant of the Send Message type.
    2.       If you maintain a message, first specify whether you want the message to be sent when the process has been completed successfully or unsuccessfully. Then choose Next.
    3.       You arrive at a window, in which you can select an existing process variant or create a new one.
    4.       If you create a new process variant, edit the document that is going to be sent, and maintain a list of recipients.
    5.       Save your process variant and go back a step.
    The message process variant is now assigned to your application process. When the message is sent, the status information and the process log can also be sent.
    Hareesh

  • How to create Information Dialog boxes in web Dynpro

    Hi,
    'm new to webdynpro.
    Can any body help me to create a dialog box.
    I would like to know how to create dialog boxes of type information, confirmation and warning
    expects reply
    thanks
    smitha

    to create confirmation dialog I tried the code
         IWDControllerInfo controllerInfo = wdControllerAPI.getViewInfo().getViewController();
        String dialogText = "The email was successfully sent!";
        IWDConfirmationDialog dialog =wdComponentAPI.getWindowManager().createConfirmationWindow( dialogText, controllerInfo.findInEventHandlers("ok"), "ok");
        dialog.addChoice(controllerInfo.findInEventHandlers("newEmail"), "new email");
        dialog.open();
    and I got error like:
    java.lang.NullPointerException
         at com.sap.tc.webdynpro.clientserver.window.ConfirmationDialogDelegate.<init>(ConfirmationDialogDelegate.java:58)
         at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.createConfirmationWindow(ClientComponent.java:926)
         at com.enteg.systallocpkg.LoginView.onActionLogin(LoginView.java:157)
         at com.enteg.systallocpkg.wdp.InternalLoginView.wdInvokeEventHandler(InternalLoginView.java:137)
         at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.invokeEventHandler(DelegatingView.java:87)
         at com.sap.tc.webdynpro.progmodel.controller.Action.fire(Action.java:67)
         at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.handleAction(WebDynproMainTask.java:100)
         at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.handleActionEvent(WebDynproMainTask.java:299)
         at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.execute(WebDynproMainTask.java:635)
         at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:59)
         at com.sap.tc.webdynpro.clientserver.cal.ClientManager.doProcessing(ClientManager.java:249)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doWebDynproProcessing(DispatcherServlet.java:154)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:116)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doPost(DispatcherServlet.java:55)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:385)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:263)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:340)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:318)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:821)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:239)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:147)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:37)
         at com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java:71)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:94)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:162)
    I don't know how to solve this
    can any body help me
    Smitha

  • How to Bring "Division" field into PCA form to create Report?

    Hi,
    I need to create Balance sheet reports -Division wise in profit center accounting.Kindly advise me how to bring Division field in to FORM of PCA.Once i get the Division field in to FORM of PCA then i can full fill the requirement.
    Kindly advise me as i am not able to bring it either through Key figures or Characterstics.how do i bring into KE84 form
    Please help me
    Supriya

    Hello,
    I do not think division wise balance sheet is possible.
    Regards,
    Ravi

  • How to create messages in PC

    Dear experts,
                 How to create in msg in Process chains. Is it okay to create msgs anywhere in the PC. Can i have the complete steps please. Thanks
    dave

    Hi Dave,
    You can create messages for any process in a Process Chain.
    1) Go to RSPC
    2) Select any process chain where you want to create a message.
    3) Right click on any process and choose 'Create Messages'.
    4) Here you have to choose any one option: Success, Fail or Always.
    5) Provide process variant name and click create button and provide description in next screen.
    6)Click on Maintain Recepiant list button and provide recepiant email address and select appropriate recepiant type. ( Eg: internet address ).
    7) Save the settings and go back to your previous screen and clik edit documents button to customize the message.( this is optional)
    Hope this helps.
    Praveen

Maybe you are looking for

  • Help syncing multiple Ipods

    I have several questions I need to get answered before I have a war on Christmas morning. 1. I bought 2 kids new Ipods for Christmas which will be used on the same PC. How do I sync 2 Ipods on the same PC with out the chance of them deleting each oth

  • Windows 8.1 error when printing photsmart B110 all in one series

    When going to print a document of more than one page the system goes into print mode but after a short delay the windows error screen appears saying there was an error to the printer. Howvever the printer some times prints the whole document or only

  • How can I find the center of the current view

    How can I find the center of the current view

  • Mail and Internet Connection conflict

    I have a VPN PPTP connection running. Most of my other Mac internet apps run fine (Safari, Fetch), for that matter Mail can read new emails. The problem is that Mail won't send mail until I close the VPN connection. I figure this is a port conflict,

  • Wrong Destination Address Messages

    Hi, i've read the posting about how I can receive this message if the old WebLogic is still running while I start a new one. This is not the case for me, I issue the 'kill -9' command on the WebLogic process and wait several seconds, then issue the s