JOptionPane : Modifying Key text

I am using JOptionPane.showInputDialog(....) to display a dialog with an input field. This works fine, but displays two keys with the text OK, and Cancel. I need to change this text (to the same words but in a different language).
The other dialog methods in JOptionPane, such as showOptionDialog() have an overloaded version with an argument of the form Object[] options, which allows me to specify some text for the keys. I don't seem to have this possibility with showInputDialog().
I have tried creating a JOptionPane object, using the appropriate constructor, which allows me to set options, but when I invoke showInputDialog(), my options text is ignored.
How do I go about changing the text on the keys in JOptionPane.showInputDialog()?

Read the API description for JOptionPane. There is an example there showing you how to do this.

Similar Messages

  • Using scroll wheel with modifier key to zoom out is not working

    I can't zoom out with the magnifying tool selected in all programs of the CS3 suite using the option key on a Mac. I can zoom in with no problem. I've been trying to figure this out for "8 hours" now!!!
    I do have this checked in the system preferences and Photoshop preferences. I don't think this is considered a keyboard shortcut but I do have universal access checked and zoom out checked in the system preferences.
    I searched this site and all of the internet looking for answers but can't seem to find much. I appreciate any help you can give. I'm way behind on my work today.
    Thank you!

    The default key for scrolling zoom is not Command but Control. To change this, go to System Preferences —> Universal Access and click on the Seeing tab. In the Zoom pane, click on the Options button, and in the sheet that drops down, select the text box at the bottom, highlight the character there, then press the modifier key you prefer.
    HTH
    Archie

  • Zoom:Use Scroll wheel with Modifier Keys to Zoom

    Help! Since the 10.6 update from 10.4.11, I can no longer zoom in and out by holding Command while moving scroll ring on my Kensington Expert Mouse. I have tried other modifier keys to no avail.
    I suspect a conflict, but do not know where to fix it. When in Firefox 3.5.2., Command plus scroll ring zooms the active window nicely. Any ideas or should I provide feedback to Apple or both? Thanks! DJ

    The default key for scrolling zoom is not Command but Control. To change this, go to System Preferences —> Universal Access and click on the Seeing tab. In the Zoom pane, click on the Options button, and in the sheet that drops down, select the text box at the bottom, highlight the character there, then press the modifier key you prefer.
    HTH
    Archie

  • Idoc problem: I canu00B4t modify Header text before sales order is created

    We are generating Sales order with Idoc :ORDERS01 (Inbound), and we´d like modify some  text in E1EDKT1 AND E1EDKT2 segments, at header level.
    We are using EXIT_SAPLVEDA_011 with this coding:
    data: v_e1edkt1 like e1edkt1,
          v_e1edkt2 like e1edkt2,
          v_index like sy-tabix.
    segment E1EDKT1----
        read table dedidd with key segnam = 'E1EDKT1'.
        if sy-subrc eq 0.
          v_index = sy-tabix.
          v_e1edkt1 = dedidd-sdata.
          v_e1edkt1-tdid = '001'.
          v_e1edkt1-tsspras = 'EN'.
          v_e1edkt1-tsspras_iso = 'E'.
          v_e1edkt1-tdobject = 'VBBK'.
          dedidd-sdata = v_e1edkt1.
          modify dedidd index v_index.
    segment:E1EDKT2----
              read table dedidd with key segnam = 'E1EDKT2'.
              if sy-subrc eq 0.
                v_index = sy-tabix.
                v_e1edkt2 = dedidd-sdata.
                v_e1edkt2-tdline = 'FIXED TEXT BLA BLA BLA '.
                v_e1edkt2-tdformat = '*'.
                dedidd-sdata = v_e1edkt2.
                modify dedidd index v_index.
             endif.
        endif.
    but Nothing .. I'm not able to modify the text when the Sales ordes is created.
    Are we modifying the right structure ?? or  do we need to flagear some variable ??
    any suggestion ???

    Ok!. I moved the coding to EXIT_SAPLVEDA_001:
    if segment-segnam = 'E1EDKT1'.
          V_puntero   = sy-tabix.
          V_E1EDKT1 = segment-sdata.
          V_E1EDKT1-TDID        ='003'.
          V_E1EDKT1-TSSPRAS     ='EN'.
          V_E1EDKT1-TSSPRAS_ISO ='E'.
          V_E1EDKT1-TDOBJECT    ='VBBK'.
          segment-sdata = V_E1EDKT1.
    endif.
    if segment-segnam = 'E1EDKT2'.
          V_puntero   = sy-tabix.
          V_E1EDKT2   = segment-sdata.
          V_E1EDKT2-TDLINE     ='FIXED TEXT BLA BLA BLA..'.
          V_E1EDKT2-TDFORMAT   ='*'.
          segment-sdata = V_E1EDKT2.
    endif.
    It´s not working .! .
    I have a suspect with TDID   ='003', if I check the Sap table: STXH-TDID , that ID is char 4.

  • How to make modifier keys lockable? (like Caps Lock for Ctrl or Alt)

    Playing around with the non-modal text editor ne, I found myself wondering if one could simulate a modal interface (like vim has) by having something like "Ctrl Lock" or "Alt Lock" (analogous to Caps Lock) and thus a "ctrl mode"/"alt mode". I would like to try this, but I am not sure how to make it happen.
    My best guess is that this could be accomplished via XKB, but its documentation looks pretty intimidating. Is anyone here proficient in XKB and could point me in the right direction?
    Other ideas:
    – Is this something that a terminal emulator could do? Is there already one that can do it?
    – Or a shell?
    – For console applications, would it be possible to have a small wrapper that did nothing but intercept keyboard input and just pass everything through to the wrapped process, except that it would take into account the desired lockable modifier key? (I am thinking of tput here, but from my first search it appears that it doesn't do this sort of thing.)

    @Trilby: Thank you for the elaborate input!
    @drcouzelis: "sticky keys" normally means that modifiers remain active only until the next keypress, while I want a way to lock them in active state for an arbitrary number of keypresses. But still, "sticky keys" was a worthwile input for the search engine.
    The program xkbset, which can be used to set XKB options on the fly, has a function that comes very close to what I desire:
    $ xkbset h
    Usage: To set or unset various options:
    xkbset <options>
    where <options> may be all or any of (the '-' switches the feature off,
    otherwise it is switched on):
    To switch sticky keys on or off, and optionally set or reset:
    () two keys pressed at the same time stops sticky keys;
    () a modifier pressed twice will be locked:
    [-]{sticky|st} [[-]twokey|[-]latchlock]...
    I cannot select specific modiers to be affected with xkbset, but that would be fine with me. Sadly, it didn't completely work for me:
    – It doesn't affect Alt at all for me.
    – The effect seems to go away as soon as I change the window. (Maybe I need to invoke xkbset from .xinitrc for its effects to persist throughout the session? I will try that.)
    So I went on and tried to configure XKB manually. I got up to a certain point without studying the documentation in-depth, but now I have landed on an error message that seems to suggest to me that I would have to get to a better understanding about the layout files before I could understand it. Here is what I did:
    1. Got my current XKB configuration:
    xkbcomp :0 output.xkb
    2. Editet output.xkb to include the following at the end of the xkb_compatibility section:
    //Hoping this makes the ^-key into a Ctrl-Lock key:
    interpret TLDE {
    action= LockMods(modifiers=Control);
    3. Then I recompiled the configuration back into the running X server:
    $ xkbcomp out.xkb :0
    Warning: Compat map for group 2 redefined
    Using new definition
    Warning: Compat map for group 3 redefined
    Using new definition
    Warning: Compat map for group 4 redefined
    Using new definition
    Error: Couldn't lookup keysym
    Symbol interpretation ignored
    Warning: No symbols defined for <AB11> (keycode 97)
    Warning: No symbols defined for <JPCM> (keycode 103)
    Warning: No symbols defined for <I120> (keycode 120)
    Warning: No symbols defined for <AE13> (keycode 132)
    Warning: No symbols defined for <I149> (keycode 149)
    Warning: No symbols defined for <I154> (keycode 154)
    Warning: No symbols defined for <I168> (keycode 168)
    Warning: No symbols defined for <I178> (keycode 178)
    Warning: No symbols defined for <I183> (keycode 183)
    Warning: No symbols defined for <I184> (keycode 184)
    Warning: No symbols defined for <FK19> (keycode 197)
    Warning: No symbols defined for <FK24> (keycode 202)
    Warning: No symbols defined for <I217> (keycode 217)
    Warning: No symbols defined for <I219> (keycode 219)
    Warning: No symbols defined for <I221> (keycode 221)
    Warning: No symbols defined for <I222> (keycode 222)
    Warning: No symbols defined for <I230> (keycode 230)
    Warning: No symbols defined for <I247> (keycode 247)
    Warning: No symbols defined for <I248> (keycode 248)
    Warning: No symbols defined for <I249> (keycode 249)
    Warning: No symbols defined for <I250> (keycode 250)
    Warning: No symbols defined for <I251> (keycode 251)
    Warning: No symbols defined for <I252> (keycode 252)
    Warning: No symbols defined for <I253> (keycode 253)
    The "Error" part is where I am currently stuck. It tells me that my changes were ignored (I no that it's about them because it goes away when I comment them out), but I don't yet understand why.

  • Specific modifier keys not responding

    I'm having a big issue, and I'm hoping that other PowerBook Pro users can help me to see if I have an isolated issue. I've been doing considerable testing on this to narrow the problem, and have had several calls to Applecare with no real resolution (until I'm ready to drop it off at an Apple Store).
    Here's the issue. After repeated uses with an external pointing device (usb mouse, bluetooth mouse, usb Wacom tablet, wireless bluetooth Wacom tablet), by clicking and dragging certain modifier keys become disabled. The best example is when using photoshop (but the issue can be duplicated in any application). In Photoshop, clicking and dragging with an external mouse (or pointing device) with the paint brush tool selected, paints on the canvas, then holding the option key should turn the paintbrush into the eyedropper tool. After about 15 to 20 strokes with the paintbrush, holding down the option key no longer will result in the eyedropper tool, until pressing the cmd key to break out of it.
    As I said before this bad behavior is only reproduced with an external device, and will occur in any application. The keys that this affects are the option key (as noted), the shift key, and the control key on the left side of the keyboard only. This can be also reproduced in any application. Even in TextEdit. The behavior in TextEdit will result with the same issue. Here's what the normal behavior should be; holding down the option key changes the cursor to a Plus symbol and dragging over a few lines of text will select text out of sequence, much like drawing a box around text to select it. Holding down the Shift Key and the Option Key will change the cursor to the plus symbol, but will start a selection from the start of the line to the position of the cursor. And obviously pressing the control key while clicking will bring up a contextual menu.
    The bad behavior starts off by selecting text over and over about 20 times. Without pressing the cmd key, press the option key. Does the cursor turn into a Plus sign? What happens when the control key is held, and the mouse is clicked? Does a contextual menu appear? If this is not the same as the expected behavior, then there is an issue.
    I've checked the Modifier Keys option in the Keyboard section of the System Preferences and all the keys are mapped appropriately.
    Please try this out, and tell me your results. I'm trying to determine if I have an isolated issue, or if this is something consistent among the MacBook Pros. If you try it, post what OS version and type of MacBook Pro you are working with.
    Thanks

    Do you have any of the apps running that are listed here:
    http://www.bugge.com/Family-and-friends/Illy/other.html

  • Changing keyboard modifier keys

    I use an editor (EMACS) which makes major use of the 'ctrl' key so I swap it with the 'caps lock' key so my little finger can hit it without getting a cramp. It works just fine about 90% of the time but the other 10%, when I hit the 'caps lock' key instead of getting the 'ctrl' function I get the 'caps lock' function and my editing screws up terribly. It is really frustrating because if I don't notice, and if I hit what I think is <ctrl>k to kill a line I get a 'K' in the text instead.
    PowerBook G4    

    I solved this problem by finding and altering an applescript that will change the keyboard modifier keys. I wish I could still find the web page so I could post it, but here's the applescript I used to change to PC layout:
    tell application "System Preferences"
    activate
    set current pane to pane "com.apple.preference.keyboard"
    end tell
    tell application "System Events"
    tell process "System Preferences"
    click radio button "Keyboard" of tab group 1 of window "Keyboard & Mouse"
    click button "Modifier Keys…" of tab group 1 of window "Keyboard & Mouse"
    click pop up button 3 of sheet 1 of window "Keyboard & Mouse"
    click menu item 4 of menu 1 of pop up button 3 of sheet 1 of window "Keyboard & Mouse"
    delay 1
    click pop up button 4 of sheet 1 of window "Keyboard & Mouse"
    click menu item 3 of menu 1 of pop up button 4 of sheet 1 of window "Keyboard & Mouse"
    click button "OK" of sheet 1 of window "Keyboard & Mouse"
    end tell
    end tell
    tell application "System Preferences"
    quit
    end tell
    (end of script)
    And here's the script I used to change it back to Mac layout:
    tell application "System Preferences"
    activate
    set current pane to pane "com.apple.preference.keyboard"
    end tell
    tell application "System Events"
    tell process "System Preferences"
    click radio button "Keyboard" of tab group 1 of window "Keyboard & Mouse"
    click button "Modifier Keys…" of tab group 1 of window "Keyboard & Mouse"
    click button "Restore Defaults" of sheet 1 of window "Keyboard & Mouse"
    click button "OK" of sheet 1 of window "Keyboard & Mouse"
    end tell
    end tell
    tell application "System Preferences"
    quit
    end tell
    (end of script)
    I saved the scripts as executibles with neat Apple and XP custom icons and put them in the Dock. Pretty slick.

  • Cross browser testing : Modifier Keys playback actions not working in chrome and Firefox

    Hi,
    In my work flow I have to select multiple items in list.So I have recorded 'Ctrl+Click' action to select list items.In Chrome and Firefox it is not selecting multiple Items.
    Even Ctrl+A,Ctrl+C,Ctrl+V also not working in chrome and Firefox.Complete modifier keys support is not observed in chrome and Firefox.Let me Know how to automate modifier keys actions in cross browser?
    Regards,
    Nagasree.

    Hi Nagasree,
    Welcome to MSDN forums.
    First,please make sure the Chrome and Firefox is supported by cross browser testing.
    Latest version of Chrome and Firefox supported by cross browser testing are Chrome version 38.0.2125.111 and
    Firefox 33.
    I doubt whether Chrome and Firefox in cross browser testing don’t support automating modifier keys or there is anything wrong on it if you are using supported browser. Since this issue is related to the Extensions tool
    Selenium components for Coded UI Cross Browser Testing, if possible, I suggest you post this
    issue here, click “Q AND A”, and then you could post this issue there, you would get dedicated
    support there.
    Thanks for your understanding.
    Best regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to get a key text in report

    HI
    in my report i am unable to get a key text
    the report is showing the vendor or material by number not by name
    can anyone help...
    thanx ,
    UMAR NAYAB.

    Hello,
    when you mentioned:
    when you run the universe query, on the left side, expand the L01 <Charateristic> and drag in the L01 <Characteristic> Key which is the green colored icon along the L01 <Char>. This will get you the key and the text in your webI
    Are you doing this in the webi report after you refresh it?
    Or are you doing this in BEX?
    I am able to get EITHER the text or key to display.
    I get the text when i have the properties set to Text & Key and Medium length for the Text View.
    Any other selection for text View, like std or long, result in seeing the key instead of the text.
    Thanks,
    Bill

  • [SOLVED] xmodmap qt4 modifier keys no longer work

    Hi, I'm nearing the "hair-pulling stage because Googling this issue did not yield helpful results" stage.
    I am having trouble getting modifier keys (CTRL, ALT) to work in qt apps after loading my custom keymap (as provided by ~/.Xmodmap). If my custom keymap is not loaded, then ctrl, alt keys work fine in qt apps. That is, it is only when this custom keymap is loaded that qt apps no longer respond to what I have mapped as the CTRL and ALT keys.
    I have awesome wm setup to load the command xmodmap ~/.Xmodmap automatically on startup using this lua code:
    awful.util.spawn("xmodmap " .. os.getenv("HOME") .. "/.Xmodmap")
    My ~/.Xmodmap has comments on what I've switched around.
    I am not sure what is causing this to occur? How can I fix this?
    FYI on Xfce4 loading the custom key mappings don't lead to this issue with qt apps not responding to what I've set as modifier keys.
    Update 10/08/2014 5:55PM CST It turns out I had a different .Xmodmap from when I was using Xfce4. There's something funky with the version I was using with awesome wm.  I've updated Xmodmap here, in case somebody runs into a similar issue.
    Last edited by hckr (2014-10-08 22:59:59)

    To get my inspiron 8500 working I had to use the xkbmodel set to inspiron and remap a little like this
    /etc/X11/xorg.conf
    Section "InputDevice"
    Identifier "Keyboard0"
    Driver "kbd"
    Option "CoreKeyboard"
    Option "XkbRules" "xorg"
    Option "XkbOptions" "altwin:super_win"
    # Option "XkbModel" "pc105"
    Option "XkbModel" "inspiron"
    Option "XkbLayout" "gb"
    Manually configured other keys in ~/.Xmodmap. To see current mappings use "xmodmap -pk"
    keycode 162 = XF86AudioPlay
    keycode 153 = XF86AudioNext
    keycode 144 = XF86AudioPrev
    keycode 164 = XF86AudioStop
    keycode 129 =
    keycode 130 =
    keycode 131 =
    keycode 132 =
    The 129-132 were wrongly mapped so I unmapped them
    I then still had to configure Amarok global shortcuts to use the keys, but it worked, Maybe as I am using XFCE.
    Last edited by alleyoopster (2008-11-22 23:35:17)

  • Modifier keys not working after 10.6.7 update

    After the most recent 10.6.7 update, my modifier keys no longer work. I switched my Command and Option keys over a year ago, but now even when I'm in System Preferences>Keyboard>Modifier Keys and I switch them back and forth from Restore Defaults to the way I had them, nothing changes. I deleted  /username/Library/Preferences/ByHost/com.apple.HIToolbox.UUID.plist and logged off and back on, but that didn't work. Any suggestions?

    After the most recent 10.6.7 update, my modifier keys no longer work. I switched my Command and Option keys over a year ago, but now even when I'm in System Preferences>Keyboard>Modifier Keys and I switch them back and forth from Restore Defaults to the way I had them, nothing changes. I deleted  /username/Library/Preferences/ByHost/com.apple.HIToolbox.UUID.plist and logged off and back on, but that didn't work. Any suggestions?

  • Unable to change modifier keys on exernal keyboard.

    Running a unibody MBP with 10.8.5.  Trying to change the modifier keys (swap Option and Command) on an external USB keyboard (daskeyboard ultimate stealth).  Using Preferences -> Keyboard/Mouse -> Modifier Keys, I select my external keyboard (listed as daskeyboard) and make the switch.  This has no effect.  I am able to change the modifiers on the built in keyboard, but that doesn't help me. 
    I am not running the KB through a hub, direct connect to USB port.
    I have tried all possible combinations of adjust settings, reboot, retry, unplug, re-plug, move plug - no joy.
    From other posts here and elsewhere it seems this bug/glitch has been in Apple's side for a lot of years.  Does anyone have a FIX for this that does not involve some hacky workaround where a chicken needs to die?
    I run a linux VM on this Mac and it would be really nice if CTRL and ALT were where CTRL and ALT have been for decades.

    Hello
    I have a new Toshiba Satellite A75-S209 laptop. Now the keyboard was working perfectly, until i plugged in a external logitech usb keyboard. Now when i try to use the laptop keyboard alone all the characters are messed up.
    i have tried to reinstall the keyboard by removing it, but i was not successful .
    is there any way of re mapping all the keys?
    or even like keyboard software?!
    thanks
    nelby

  • Modifier Key Mapping Not Working

    When I'm at home, I connect my MacBook Pro to a 24" LCD, along with an external keyboard and mouse. One of the small features I was looking forward to in Leopard was not having to go into System Preferences and switch the modifier keys to correctly work with my external keyboard, but I've discovered that the feature isn't working. I choose "USB Receiver" from the keyboard drop-down, re-map the Option and Command keys, click OK, and close SysPrefs. Nothing has changed; the Command key on my keyboard is still performing as Option and Option is still Command. When I go into the Keyboard & Mouse section of SysPrefs, the Modifier Keys pane is back to it's default values. I'm wondering if this is a bug in 10.5 that will be fixed with 10.5.1, or if it's just my keyboard. Any tips would be greatly appreciated!
    Message was edited by: bradbergeron
    Message was edited by: bradbergeron

    Any updates on this bug?
    On my Powerbook, I have to swap the modifier keys under the "All" setting to make the change take effect on the external USB keyboard I'm using. Changing modifier keys on just the "DELL USB KEYBOARD" (in my particular case) has no effect.
    It's just a minor annoyance (having to reset my modifier keys back to defaults when I need to use the built-in keyboard), but all the same the feature doesn't appear to work as it should.
    Or is it just me?

  • How to Display key/text in default selection screen?

    HI Gururs,
    I want to display key/text in variable default selection screen in BI Analyzer in Quality.
    please give me any suggestions to resolve this.
    Thanks
    vadlamudi

    hi,
    What i have done is in the cube level, in the dimensions i have made specific properties and set to key/text in development, so its working fine in development of the analyzer, but still its showing text only in quality analyzer.
    please give me the solutions if you know any.
    regards
    vadlamudi

  • Modify the text in the file

    Hi,
    I have a text file with few lines. Please let me know hot to modify the text in in the line.
    for example if my file contains :
    this is line 1.
    this is line two.
    this is line 3.
    now i want to replace 1 by one and 3 by three.
    this is a simple example but my requirement is some other .
    I tried opening the file reading the strings and comparing and changing and writting it to new file.
    is there any way to directly open the file and modify without using the second file to be created.
    Thanks in advance,
    pavan

    the actual problem is there is a file in following kind of entry in each line
    <string>, starting point, ending point.
    eg. "this is a file" , 10, 20.
    now i want to calculate the length of the string and add to starting point and check with ending point if it is false then update the ending point with actual value.

Maybe you are looking for

  • Tax Amounts not Pulling into Order

    We are using Vertex Series Q tax software. When we have taxable line items for the state of Washington, we are get the tax rates back from Vertex but the tax amounts are not calculating. I have tested this for the state of Pennsylvania and I get both

  • Can't drag icons on desktop or anywhere

    Running on a iMac OS 10.9.3. Today I plugged in a "WD My Passport" external hard drive to copy files over onto my computer (this hard drive is formatted for a Windows computer but I could still read and copy the files, just not write onto it). After

  • Changing layout for VF04

    When running the billing due list (VF04) for order related documents, our users want to see the field  "order reason" in the results. I am not able to add any fields in the results of VF04. I checked the layout settings and found that SAP does not al

  • A new instance of the program

    Hello everyone! I have a simple text editor and I need to open a new document in a new instance of it from it. I created a new frame, but I could not get any focus on it because there was a modal dialog running. When dialog was closed I noticed that

  • Flash CS4 crashing on start up

    I'm using CS4 (in Windows 7), and it's been crashing upon start up for a week now. I just used this program in Decemeber and it was working properly. Does anyone have any advice on how to fix it? The application Adobe Flash CS4 has unexpectedly quit.