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 ?
Similar Messages
-
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,
VeenaYou 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 -
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,
JimSure, 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 -
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
Chandhi,
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 -
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.
AliYou need dialogListener..
public void dialog1_dialogListener(DialogEvent dialogEvent) {
if (dialogEvent.getOutcome().equals(DialogEvent.Outcome.yes)){ //for Yes
}else{ //for Cancel
} -
How can i see and cancel hidden files on a external HD?
How can I see and cancel hidden files on a external HD with macbook pro and Lion?
Use this AppleScript, saved as an application to toggle hidden files/folders on and off:
if (do shell script "defaults read com.apple.finder AppleShowAllFiles") is equal to "0" then
do shell script "defaults write com.apple.finder AppleShowAllFiles 1"
else
do shell script "defaults write com.apple.finder AppleShowAllFiles 0"
end if
do shell script "killall Finder" -
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? -
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. -
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. -
How to put Check Boxes and Radio button in Smartforms
Hi all,
How to put check Box and radio button in Smartforms ............ from web properties there is an option to use. But How to use.
regards,
Mohsinu can declare the checkboxes or radiobuttons whatever in driver program and pass the same to ur form...
-
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
prasanthHi....
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 -
How to hide the Print and Export button in analytics report or tasks pane
Hi Experts,
In BIEE 11g,
How to hide the Print and Export button in analytics report or tasks pane ?
For example:
In console,I have created one userA which is belong to BIConsumer GROUP , when I make use of the highest user 'weblogic' to create one simple report, then the userA will login the analytivs to view this report (not dashboard), it will show the print and export as below.So customers do not want to give him the privilege for printing and exporting.
In addtion, go to catalog->tasks(left corner), it will also show the print and export button. So how to hide or not access these button?
Note: Maybe it can use the policy for consumer role for implementing this requirement, but I do not know how to modify the policy. Are you facing the problem? Thanks.Hi,
1. Create seperate folder for Reports & Dashobard.
2. For BI_Consumer (userA) set the catalog permission to view Dashboard Folder only and remove permission on the Report Folder (you can give traverse permission but don't give Open permision).
3. By this user won't be able to open or run any reports in that folder and the only way he can see the reports is through Dashboard and on dashboard the export and print buttone can be removed very easily.
Mark helpful if it helps.
Regards,
Kashi
Edited by: K N Yadav on 24 May, 2013 1:51 AM -
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 -
I turn it off and it will wait anywhere from a few seconds to a few hours and turn itself back on. You can see how that can get annoying and I can't seem to solve the problem.
There's a slight chance this might help:
Intel-based Macs: Resetting the System Management Controller (SMC)
Otherwise it needs to be repaired. -
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]
Maybe you are looking for
-
Hi, I need help on detailed processing of down payments in following scenarios., Down payment in case of normal billing & where it gets adjusted in equal % in subsequent billing.Like customer pays a down payment of Rs 100 & it gets adjusted in the su
-
Macbook pro vs htc touch diamond pair
I want to use my diamond as a modem. I've installed it through bluetooth mac utility. Installation was successfull. I've entered valid APN and checked box which enables PPN connection. But when i want to connect, i got error (couldn't connect to devi
-
Hello, I am relatively inexperienced with iWeb. I have published one little page with a few photos just for experimentation purposes. But now I am trying to do a page with vacation photos and videos to share with family and it won't publish. Here is
-
Need help regarding the few clarification in writing cmod
Hi All, I need to write a cmod by creating a new project for that. The main purpose is to define variables in it which will be used in reporting(restrictions). Now I need to enhance that structure with RSR00001 code since it dealys with declaring
-
I received a large amount in an iTunes card this Christmas, it looked to have been purchased from Apple online then the whole card thing printed. It has two codes on it one that says "PIN" and one that says "Gift card number" I have tried entering th