Moving ok and cancel buttons

Hi,
When I do JOptionPane.showOptionDialog(...);
Can anyone tell me how to make the ok and cancel buttons appear at the bottom right of the dialog instead of the bottom center.
Thanks,
Jim

Sure, use another panel as a spacer thusly:
| |
| Other Panels |
| |
| Spacer | OK Can|<-position panel contains both panels
Use BorderLayout for the entire dialog and set a position panel to be SOUTH (If you are using someother layout, add a full panel as a backdrop and move your Other panels into it using NORTH). Add the Spacer panel and 'OK/Cancel' panel to this using GridLayout (2 columns, 1 row).
There is no restriction, other than memory size, to how many panels you use and their hierarchy.
Robert Templeton

Similar Messages

  • [svn:osmf:] 14521: ChromeLibrary: moving live and recording buttons to the left hand side of the control bar , and making the button backdrops a little bigger.

    Revision: 14521
    Revision: 14521
    Author:   [email protected]
    Date:     2010-03-02 12:47:27 -0800 (Tue, 02 Mar 2010)
    Log Message:
    ChromeLibrary: moving live and recording buttons to the left hand side of the control bar, and making the button backdrops a little bigger.
    Modified Paths:
        osmf/trunk/libs/ChromeLibrary/assets/control bar.ai
        osmf/trunk/libs/ChromeLibrary/assets/images/eject_up.png
        osmf/trunk/libs/ChromeLibrary/assets/images/fullScreenEnter_disabled.png
        osmf/trunk/libs/ChromeLibrary/assets/images/fullScreenLeave_disabled.png
        osmf/trunk/libs/ChromeLibrary/assets/images/live_disabled.png
        osmf/trunk/libs/ChromeLibrary/assets/images/live_down.png
        osmf/trunk/libs/ChromeLibrary/assets/images/live_up.png
        osmf/trunk/libs/ChromeLibrary/assets/images/minus_disabled.png
        osmf/trunk/libs/ChromeLibrary/assets/images/minus_down.png
        osmf/trunk/libs/ChromeLibrary/assets/images/minus_up.png
        osmf/trunk/libs/ChromeLibrary/assets/images/pause_up.png
        osmf/trunk/libs/ChromeLibrary/assets/images/play_up.png
        osmf/trunk/libs/ChromeLibrary/assets/images/plus_disabled.png
        osmf/trunk/libs/ChromeLibrary/assets/images/plus_down.png
        osmf/trunk/libs/ChromeLibrary/assets/images/plus_up.png
        osmf/trunk/libs/ChromeLibrary/assets/images/qualityAuto_disabled.png
        osmf/trunk/libs/ChromeLibrary/assets/images/qualityAuto_down.png
        osmf/trunk/libs/ChromeLibrary/assets/images/qualityAuto_up.png
        osmf/trunk/libs/ChromeLibrary/assets/images/qualityManual_down.png
        osmf/trunk/libs/ChromeLibrary/assets/images/qualityManual_up.png
        osmf/trunk/libs/ChromeLibrary/assets/images/record_disabled.png
        osmf/trunk/libs/ChromeLibrary/assets/images/record_down.png
        osmf/trunk/libs/ChromeLibrary/assets/images/record_up.png
        osmf/trunk/libs/ChromeLibrary/src/org/osmf/chrome/controlbar/ControlBar.as

    Revision: 14521
    Revision: 14521
    Author:   [email protected]
    Date:     2010-03-02 12:47:27 -0800 (Tue, 02 Mar 2010)
    Log Message:
    ChromeLibrary: moving live and recording buttons to the left hand side of the control bar, and making the button backdrops a little bigger.
    Modified Paths:
        osmf/trunk/libs/ChromeLibrary/assets/control bar.ai
        osmf/trunk/libs/ChromeLibrary/assets/images/eject_up.png
        osmf/trunk/libs/ChromeLibrary/assets/images/fullScreenEnter_disabled.png
        osmf/trunk/libs/ChromeLibrary/assets/images/fullScreenLeave_disabled.png
        osmf/trunk/libs/ChromeLibrary/assets/images/live_disabled.png
        osmf/trunk/libs/ChromeLibrary/assets/images/live_down.png
        osmf/trunk/libs/ChromeLibrary/assets/images/live_up.png
        osmf/trunk/libs/ChromeLibrary/assets/images/minus_disabled.png
        osmf/trunk/libs/ChromeLibrary/assets/images/minus_down.png
        osmf/trunk/libs/ChromeLibrary/assets/images/minus_up.png
        osmf/trunk/libs/ChromeLibrary/assets/images/pause_up.png
        osmf/trunk/libs/ChromeLibrary/assets/images/play_up.png
        osmf/trunk/libs/ChromeLibrary/assets/images/plus_disabled.png
        osmf/trunk/libs/ChromeLibrary/assets/images/plus_down.png
        osmf/trunk/libs/ChromeLibrary/assets/images/plus_up.png
        osmf/trunk/libs/ChromeLibrary/assets/images/qualityAuto_disabled.png
        osmf/trunk/libs/ChromeLibrary/assets/images/qualityAuto_down.png
        osmf/trunk/libs/ChromeLibrary/assets/images/qualityAuto_up.png
        osmf/trunk/libs/ChromeLibrary/assets/images/qualityManual_down.png
        osmf/trunk/libs/ChromeLibrary/assets/images/qualityManual_up.png
        osmf/trunk/libs/ChromeLibrary/assets/images/record_disabled.png
        osmf/trunk/libs/ChromeLibrary/assets/images/record_down.png
        osmf/trunk/libs/ChromeLibrary/assets/images/record_up.png
        osmf/trunk/libs/ChromeLibrary/src/org/osmf/chrome/controlbar/ControlBar.as

  • Using Tiscali Webmail with Firefox 6. If I try and delete an email the Ok and Cancel buttons are disabled and nothing happens, have to use F5 to take me back. IE8 works so is this a compatibility issue?

    Using Tiscali Webmail with Firefox 6. If I try and delete an email the Ok and Cancel buttons are disabled and nothing happens, have to use F5 to take me back. IE8 works so is this a compatibility issue?

    It appears OP solved the problem: [/questions/874744]

  • Creating a dialog box with OK and Cancel buttons without OADialogPage

    Hi Experts,
    i want to create a dialog box for Delete Confirmation means after clicking on delete it should pop up a small dialog box with OK/Cancel buttons
    and need code for the same to handle the buttons.
    i have created with OADialogPage but its showing in a complete page but i want to show those buttons in a small box.
    Plz help.
    THANKS IN ADVANCE.
    Thanks
    Raja.

    Hi,
    I have not tried using javascript in destination URI as suggested by Mukul.
    I have tried the below code for opening a page as dialog box.
    You can try it for your requirement by creating a dialog page of your own, say XXDialogPage (with OK and Cancel button)
    StringBuffer l_buffer = new StringBuffer();
    l_buffer.append("javascript:mywin = openWindow(top, '");
    String url = "/OA_HTML/OA.jsp?page=/xx/oracle/apps/fnd/dialog/webui/OADialogPG";
    OAUrl popupUrl = new OAUrl(url, OAWebBeanConstants.ADD_BREAD_CRUMB_SAVE );
    String strUrl = popupUrl.createURL(pageContext);
    l_buffer.append(strUrl.toString());
    l_buffer.append("', 'lovWindow', {width:500, height:500},false,'dialog',null);");
    pageContext.putJavaScriptFunction("SomeName",l_buffer.toString());
    In dialog page's controller, you can forward it to the page onc ethe user selects OK or Cancel.
    Pass the selected value back to the main page and further you can use it for deleting.
    Regards.

  • Reg: save exit and cancel buttons

    Hi,
    In normal report programs when we enable the back , exit and cancel buttons they work fine without writing any code.but its not in the case of Module pool why?
    In thr normal reports where does the code come from?
    regards
    prasanth

    Hi....
    Module pool programs is nothing but screen flow + reports...
    Here we designing the screens....
    So we hav to to give every functionality.. for all buttons and menu items of the appeared screen...
    Where as in reports...,
    We are just using the standard screen (sellection screen and list output screen ) s mostly...,
    Here also some times we hav to go for created screens.. nothing but.... interactive reports...,
    There we need to give again all those functionalities...
    And..,
    To see the BACK button logic and other logics in the reports...,
    Ex: PAI event of SAPLWBABAP program..., 
    You can find that name with...
    By giving /H and enter before ur action...
    Thanks,
    Naveen.I

  • Mapping enter and esc to ok and cancel buttons

    Hi,
    Does java's fine API offer any method of mapping Enter and ESC to OK and Cancel buttons in a customized JDialog?
    The current way I'm doing it is through a brute force of adding a KeyListener to every component in the dialog box (in an automated way), is there another way?
    Any suggestions would be appreciated.

    Uh oh, should I be scared because he knows more about
    Swing than just about anyone?
    Yes. Because if you really get stuck then he won't help you and then you are doomed.
    If anybody was rude it was him, and if anybody is an
    idiot it's you. See how easy it is to make claims
    without providing any reasons or rationale?Reasons and rationale have been provided but I guess you didn't grasp them the first go around so here goes.
    1) You were impatient
    You waited 30 minutes before whining and bumping. That is impatient. Nobody is being paid to deliver answers to you.
    2) You posted in the wrong forum.
    This is not the Swing forum is it? No it is not.
    3) You should learn to search
    If you had searched for even up to 15 minutes (and you wouldn't have needed this long) then you would have had your answer in half the time. Searching saves YOU time.
    4) You were rude
    When the facts (and please note the use of the word "fact" not personal opinion) above were pointed out to you then you were rude.
    Finally the "you are an idiot" problem. I will give you this is the most subjective of the lot although given that you cannot dispute ANY of the above facts (although you seem to be trying and that's helping to make the case that you're quite the idiot) that's really not saying much.
    However, it seems to me that if Person A wants the assistance of Person B (who is a valuable resource of information for person A and others) it does not seem wise for Person A to be rude to person B. So in the case of Person A who is rude to Person B who they are relying on as a free resource we can make the assertion that Person A is an idiot.
    In case you couldn't follow that you are Person A.

  • How I can internatiolization OK and Cancel buttons confirmDialog?

    private void clickButton() {
              int response = JOptionPane.showConfirmDialog(this, resBundle.getString("Confirmation_text_itroduction"),
    resBundle.getString("Confirmation_title"), JOptionPane.OK_CANCEL_OPTION,
                        JOptionPane.QUESTION_MESSAGE);
    if (response == JOptionPane.OK_OPTION) {
                   System.out.println("OK button clicked");
              } else if (response == JOptionPane.CANCEL_OPTION) {
                   System.out.println("Cancel button clicked");
    As you can see I internatiolization the title of confirm dialog and text (use object resBundle). OK!
    But how I can internatiolization OK and Cancel buttons is this confitm dialog?

    OK, I can internatiolization buttons "OK" and "Cancel" in confirm dialog:
    private void clickTestKindButton(String message) {
              Object[] options = { resBundle.getString("OK"),
                        resBundle.getString("Cancel") };
              int response = JOptionPane.showOptionDialog(this, message, resBundle
                        .getString("Confirmation_title"), JOptionPane.OK_CANCEL_OPTION,
                        JOptionPane.QUESTION_MESSAGE, null, options, options[0]);
              if (response == JOptionPane.OK_OPTION) {
                   new IntroductionTest();
              } else if (response == JOptionPane.CANCEL_OPTION) {
                   System.out.println("Cancel button clicked");
         }It's work OK!
    But how I can internatiolization buttons "OK" and "Cancel" in the input dialog ?

  • Hide Ok and Cancel buttons in a Popup

    JDev 11.1.1.5.0
    I am using an <af:popup> component. By default, when I run it shows Ok and Cancel buttons at the bottom. I don't want these two to be shown.

    Yes. I just found it right after posting this. So unmarked this thread as a question.

  • Would like to change my home page. I click on options and my general tab is blank with only the ok and cancel buttons showing. How do I fix this?

    In options, under the general tab, it is blank all except the ok and cancel buttons. I can't change my home page. Please help.

    Hi cor-el,
    Thank you for your reply. Before I had seen your reply. I went into options and under general, all of a sudden it showed what should be there. I closed browser and did it again and it didn't show. It has been blank for roughly two months. Just seems funny that I ask a question and after all this time of not showing what it should, it does, to only be blank again.
    I have also been trying to update the flash player. That comes up completely blank as well with nothing showing at all. I did this several times the day before I posted my question. That same day I also hit the reset button for firefox when I was having trouble trying to update the flash player.
    I did as you said to do. Nothing has changed. Is there something else that I could try?

  • How to handle "ok" and "cancel" button of dialog popup?

    Hello everyone,
    I'm using a dialog with type="okCancel". My question is how to handle ok and cancel button of this popup window. Here is my code below:
    <af:popup id="kriterPopup">
    <af:dialog title="Kriter Seçiniz" type="okCancel" inlineStyle="width:500px;height:400;" id="d2"
    dialogListener="#{BasvuruDegerlendirmeBean.kriterDialog}">
    <af:selectManyCheckbox label="Kriterler :" id="smc2"
    binding="#{BasvuruDegerlendirmeBean.kritersCheckbox}">
    <af:forEach items="#{BasvuruDegerlendirmeBean.kriterList}" var="item">
    <f:selectItem itemLabel="#{item.ybKriter.tur}" itemValue="#{item.ybKriter.tur}" id="si3"/>
    </af:forEach>
    </af:selectManyCheckbox>
    </af:dialog>
    </af:popup>
    I want to handle ok and cancel button of this window, and redirect to the pages which I want.
    Can anyone help me how I can do?
    Thanks, with my regards.
    Ali

    You need dialogListener..
        public void dialog1_dialogListener(DialogEvent dialogEvent) {
            if (dialogEvent.getOutcome().equals(DialogEvent.Outcome.yes)){ //for Yes
            }else{ //for Cancel
        }

  • Popups how top program the ok and cancel button

    How do I program the ok and cancel button in the popups. I want to add functionality to the existing ok and cancel buttons in the popup
    Thanks,
    Veena

    You can ise a dialog inside the popup and use a dialogListener to check how hte dialog has been closed
    public void handleDialog(DialogEvent event)
      if (event.getOutcome().equals(DialogEvent.Outcome.no))
        setGender(getOldGender());
        // reference to the gender component is from component binding
        // see selectOneRadio above - binding="#{sharedPopup.genderComponent}
        RequestContext.getCurrentInstance().addPartialTarget(getGenderComponent());
    }{code}
    Timo                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • HT4463 I keep getting the message "The application could not be downloaded. The installation could not be started."  with a "Retry" and "Cancel" button,  I have been re-trying for several hours to no avail.  What is the problem?

    I keep getting the message "The application could not be downloaded. The installation could not be started."  with a "Retry" and "Cancel" button,  I have been re-trying for several hours to no avail.  What is the problem?

    You'll need to contact support and have them check your account
    https://expresslane.apple.com/GetproductgroupList.action

  • Unable to disable Save and Cancel button on change user answer form

    Hi,
    I am not able to disable Save and Cancel button on change user answer form depending on a condition. Any kind of help will be appreciated.
    Thanks

    save and cancel are the default buttons
    check the disable default buttons...
    Nsankar

  • Lost my iPad and when I attempt to use the "LOST" feature in icloud, the NEXT and CANCEL buttons are not responding.  I have tried this on 3 different windows based computers.  Any ideas???

    When using icloud because I lost my ipad...when i attempt to use the "LOST" feature the "next" and "cancel" buttons do not respond.  I have attempted this on 3 different windows based computers on 3 different networks.  Any ideas? 

    Report to police along with serial number. Change all your passwords.
    These links may be helpful.
    How to Track and Report Stolen iPad
    http://www.ipadastic.com/tutorials/how-to-track-and-report-stolen-ipad
    Reporting a lost or stolen Apple product
    http://support.apple.com/kb/ht2526
    Report Stolen iPad Tips and iPad Theft Prevention
    http://www.stolen-property.com/report-stolen-ipad.php
    How to recover a lost or stolen iPad
    http://ipadhelp.com/ipad-help/how-to-recover-a-lost-or-stolen-ipad/
    How to Find a Stolen iPad
    http://www.ehow.com/how_7586429_stolen-ipad.html
    Apple Product Lost or Stolen
    http://sites.google.com/site/appleclubfhs/support/advice-and-articles/lost-or-st olen
    Oops! iForgot My New iPad On the Plane; Now What?
    http://online.wsj.com/article/SB10001424052702303459004577362194012634000.html
    If you don't know your lost/stolen iPad's serial number, use the instructions below. The S/N is also on the iPad's box.
    How to Find Your iPad Serial Number
    http://www.ipadastic.com/tutorials/how-to-find-your-ipad-serial-number
     Cheers, Tom

  • Yes, No and Cancel Buttons on Pop-Up for BACK or NEW button

    Hi Experts,
    First scenario:
    We have crated few mandatory fields in incident when ever we are not filling the mandatory fields and try to SAVE (Incident Tool bar button) the Incident, it will Check for any Error Messages, before saving the Document,
    If entries not found in mandatory fields record will not get saved.
    This functionality we are controlling in EH_ONSAVE method of the SRQM_INCIDENT_H/IncidentOV.
    Second scenario:
    But After filling few fields in Incident screen, If I click on NEW button for a new incident or BACK button ,  it give one popup with message Do you want to  save the changes ? With Buttons Yes, No and Cancel. If I click on the Yes button Incident gets saved with an IRN number without entry of any mandatory data.
    How can I control the second scenario as first scenario? Please suggest how to controll Yes, No and Cancel Buttons on Pop-Up for BACK or NEW button as SAVE button.
    Thanks in advance
    Chand

    hi,
    you can control  the pop-up SAVE button without saving your details or write your ownlogic on pop-up save.
    please refer to this post.
    Re: Suppress POP-UP
    regards
    Ismail

Maybe you are looking for