JTextField's default keybindings are disabled  (cut, paste ...)

Hi,
The default keybindings for JTextField (ctrl-c for copy, ctrl-x for delete, ctrl-v for paste) on windows platform are not working in my application. They do work per samples in java tutorials. These are of course "standalone".
So, there is something in my program (reasonably large ) that is causing this default behaviour to change. Any clues ?.
I disabled UIManager and it' look-n-feel changes. I don't recollect changing JTextField or it's ancestors. (JTextComponent ...)
Much thanks
/rk

If you app. is not 'standalone' is it 'sitwithfriends'? I meant "independent". Anyway your comment is funny :-)
I have solved my problem. I have explicitly created bindings.
ctrl-c --> Action
via InputMap and ActionMap.
But, my original question is un-answered. I have not made any changes to JTextComponent or JTextField. Yet in my large program JTextField's keybindings are not working as they do in an "independent"/"standalone" program. My program is a pure swing based desktop program. I have not touched the SecurityManager. It is not an applet.
Cheers ...
/rk

Similar Messages

  • Upgraded iPhone 4 to IOS 5 the default tones are all cut?

    I upgraded iPhone 4 to IOS 5 the default tones are all cut short now example is the choo choo just does a single choo. Also all of my custom ringtones were all messed up had to replace them too.

    I was searching around to find out why this was happening to my wife's phone after the iOS 5 upgrade.  Kinda really sad on Apple's part.  Almost all of the text message tones sound broken now.  We thought something went wrong in the upgrade.  Too bad.

  • My keyboard loses functionality when I try to leave comments on Facebook. Delete, backspace, apostrophe and cut, copy and paste are disabled.

    My keyboard loses functionality when I try to leave comments on Facebook.
    Delete, backspace, apostrophe and cut, copy and paste are disabled. This only happens in comments, no functionality is lost in messaging or status updates.
    I have disabled all my add-ons and restarted Firefox and the issue persists. I have updated add-ons, restarted Firefox and the issue persists.
    I have updated Firefox and that made no difference.
    I have cleared cookies and cache and still no luck.
    SOLUTION: I disabled the Grammarly Lite add-on and this seems to have resolved the issue.
    I have informed Facebook of the issue. I cannot find any information about this problem in Facebook's troubleshooting.
    I cannot replicate this issue in Internet Explorer. All the functions work fine.
    I have the same issue on a different device that runs Windows 7 Starter and on a laptop that runs Windows 8.1.

    Hello oysterchick, see a similar report :
    https://addons.mozilla.org/en-us/firefox/addon/grammarly/reviews/587040/
    thank you

  • Statically referencing the default JTextPane Cut, Paste, and Copy actions

    If all JTextPanes share the same default keymap, which includes the Cut, Paste, and Copy, how do I modify those actions statically so those modifications are available to all JTextPanes before one is instantiated?
    Also, it seems that the key bindings are linked to the UI....an HTMLEditorKit has different actions than a RTFEditorKit (except for the default actions they share), but when you swap out an editor kit, only the ActionMap is updated...why not the InputMap as well?

    The JDK 1.4 use read/write methods of editor kit for paste/copy operations. So if you set your editor kit it will be call your read/write functions.
    best regards
    Stas

  • When I try to use the editor in Joomla, I get the message that cut & paste are not available.

    Hi -- I'm using Joomla to develop a website. When I try to use the editor, I get the message that cut & paste are not available. I am directed to instructions to edit the user.js file. I found the file in xhpnmg5i.default and then inserted the various 'user_pref' lines as instructed changing the site name to "http://localhost". This made no difference whatsoever so I downloaded an add on called allow clipboard helper. Looks great but how do you use it? There's nowhere on the screen that allows you to start the program. I've spend most of the day trying to do something that I'm surprised an open source program doesn't just let me do. HELP

    Uninstall the program then download and reinstall - activate with the serial number from your Amazon purchase.
    PSE 10, 11 - http://helpx.adobe.com/photoshop-elements/kb/photoshop-elements-10-11-downloads.html 
    PE 10, 11 - http://helpx.adobe.com/premiere-elements/kb/premiere-elements-10-11-downloads.html

  • In OO Alv toolbar, sum and subsum buttons are disable as default, WHY ?

    i want to enable sum and subsum buttons in alv toolbar. However, as default those buttons are disable. How can i solve ?

    i defined ref_table and ref_field for quantity field in fieldcat  such as  
    ls_fcat-ref_table = 'V03RB'.
    ls_fcat-ref_field = 'KWMENG'.
    so i solve it. thank you for your help.

  • IIS MP - Enabling Rules and Discoveries that are Disabled by Default

    Dears,
    In the IIS MP Guide they are asking to Enabling Rules and Discoveries that are Disabled by Default.
    For below:
    DotNetCLRMemoryPercentageOfTimeInGC                                                                       
    Failed.To.Perform.Initialization.Of.IIS.Discovery.Module
    Failed.To.Perform.Web.Application.Discovery
    Failed.To.Perform.Web.Server.Properties.Discovery
    Failed.To.Perform.Web.Site.Discovery
    FailedToFindApplicationPoolWhileRetrievingState
    FailedToFindSiteWhileAttemptingToRetrieveState
    FailedToPerformApplicationPoolDiscovery
    FailedToPerformFTPServerDiscovery
    FailedToPerformFTPSiteDiscovery
    FailedToPerformIISComponentDiscoveryDueInsufficientPrivs
    FailedToPerformInitializationOfIISStateMonitoringModule
    FailedToRetrieveSiteState
    FailledToRetrieveApplicationPoolState
    I was not able to determine where I have to enable, please check snapshot:
    Question 1: For this IIS MP Guide, Shall I enable all of what I get in the photo?
    and the second doubt is about next snapshot:
    Question 2: Where shall I override?
    Thanks

    The base class the rule is targetting is "Health Service" (see the "inherited from" column, that lists the class you'll want to override for provided you want to do an override for all the objects the rule is targetting, which is what it
    sounds like you want). When you choose "override the rule" for that one it should say "for all objects of class: Health Servcie". Overriding that will override for everything the rule is targetting. You should be able to follow this logic for the rest
    of them as well.

  • Add restrictions to copy/cut/paste in Excel when a worksheet is protected

    Office Version:  Office 2007;
    Operating System:Windows 7; 
    Program:Excel
    I need to be able to select via a macro or some other way the restrictions listed below on copy/cut/paste.  The worksheet will be protected. 
    The goal is to allow a user to have the capability to type in data or copy-paste-values only in the unlocked cells.  I wish to block a user from changing the formatting or pasting a formula in an unlocked cell via copy or
    cut and paste.  This is necessary to maintain the worksheet/workbook integrity when multiple users have access to it.
    1.    
     Disable cutting from unlocked cells
    2.    
    Allow ONLY copy/paste value from any cell to any unlocked cell.   
    The user needs to be able to select locked cells.
    Ideally, the user can copy-paste-values from that locked cell an an unlocked cell.  The ability to copy from the locked cell is not an absolute need but being able to
    select the locked cell is very important due to the large size of the worksheet.
    The locked cells will have their formulas hidden.
    I entered the question in the website below but received no feedback.  The Microsoft tech support group said I should contact this IT Pro forum.
    http://answers.microsoft.com/en-us/office/default.aspx#tab=1
    Thanks

    Unfortunately it is not easy; there are lots of individual items to deal with.
    You can use Application.OnKey to disable (or repurpose) the key combinations (e.g. Ctrl+X, Ctrl+V, Shift+Del, Shift+Insert ) that you don't want used.  Typically you would do this in Workbook_Open and reverse it in Workbook_BeforeClose (and you need to
    save the workbook if necessary within Workbook_BeforeClose to prevent the user from cancelling the Save Changes message after your code has done its work).
    In Excel 2003 you could use VBA to disable or make invisible the menu items and toolbar buttons that would do actions you didn't want the user to be able to carry out.  But in 2007 you have to write XML using the custom UI editor and save it in the
    XLSM file.  A good site for information on how to work with the ribbon in 2007 is
    www.rondebruin.nl
    If you get most of the way there and get stuck on some point, do come back.
    It would be good if MS extended the protection model to prevent cut and pasting other than values - it is a common requirement.  I will go now and make that suggestion to the developers.
    Bill Manville. Excel MVP, Oxford, England. www.manville.org.uk

  • Edit menu - allowing copy/cut/paste

    I am working on creating an edit menu and I would like to be able to disable the copy/cut/paste items in the menu when their use is not possible (like when there is no text based field to copy from).
    I am guessing that one approach I can take is as follows:
    1) Determine what component currently has focus, and whether it is a text field. If it is not a text field, then all three of the menu items should be disabled.
    2) If it is a text field and there is a selection, enable the copy and cut menu items.
    3) If it is a text field and there is an insertion point, then enable paste.
    However, I have no idea how to accomplish any of those three step. Or even if that is the right approach. Also, I would like to implement the listener within my edit menu class itself (a subclass of JMenu), since I use it to insert edit menues into a number of different JFrames. I would appreciate any help or direction. Thanks.

    Woops! I see you want multiple windows. Here a redo with a frame & a dialog
    import java.awt.*;
    import java.beans.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.text.*;
    public class PasteAction extends AbstractAction {
        public PasteAction(final Window window) {
            super("Paste");
            setEnabled(false);
            putValue(MNEMONIC_KEY, new Integer('P'));
            putValue(ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_V, InputEvent.CTRL_DOWN_MASK));
            putValue(SHORT_DESCRIPTION, "blah blah");
            //putValue(SMALL_ICON, icon);
            KeyboardFocusManager man = KeyboardFocusManager.getCurrentKeyboardFocusManager();
            man.addPropertyChangeListener("permanentFocusOwner",
                new PropertyChangeListener(){
                    public void propertyChange(PropertyChangeEvent evt) {
                        KeyboardFocusManager man = (KeyboardFocusManager) evt.getSource();
                        if (window.equals(man.getFocusedWindow())) {
                            Component comp = man.getPermanentFocusOwner();
                            setEnabled(comp instanceof JTextComponent);
        public void actionPerformed(ActionEvent e) {
            Component comp = getFocusedComponent();
            if (comp instanceof JTextComponent)
                ((JTextComponent)comp).paste();
        public static Component getFocusedComponent() {
            KeyboardFocusManager man = KeyboardFocusManager.getCurrentKeyboardFocusManager();
            return man.getPermanentFocusOwner();
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    public class ActionTest {
        public static void main(String[] args) {
            JFrame f = new JFrame("ActionTest");
            createContent(f);
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.pack();
            f.setLocation(0,0);
            f.show();
            JDialog d = new JDialog(f, "dialog");
            createContent(d);
            d.pack();
            d.setLocation(f.getWidth(),0);
            d.show();
        static void createPanel(RootPaneContainer rpc) {
            Container panel = new JPanel(new GridBagLayout());
            GridBagConstraints gbc = new GridBagConstraints();
            gbc.fill = GridBagConstraints.HORIZONTAL;
            for(int y=0; y<10; ++y) {
                gbc.gridy = y;
                gbc.gridx = 0;
                panel.add(new JTextField("field " + y, 20), gbc);
                gbc.gridx = 1;
                panel.add(new JButton("button " + y), gbc);
            rpc.getContentPane().add(panel);
        static void createMenuBar(RootPaneContainer rpc, Action action) {
            JMenuBar mb = new JMenuBar();
            JMenu menu = new JMenu("Edit");
            menu.setMnemonic('E');
            menu.add(action);
            mb.add(menu);
            rpc.getRootPane().setJMenuBar(mb);
        static void createToolBar(RootPaneContainer rpc, Action action) {
            JToolBar tb = new JToolBar();
            tb.add(action);
            rpc.getContentPane().add(tb, BorderLayout.NORTH);
        static void createContent(RootPaneContainer rpc) {
            createPanel(rpc);
            PasteAction paste = new PasteAction((Window)rpc);
            createMenuBar(rpc, paste);
            createToolBar(rpc, paste);
    }

  • Cut & Paste - different position relative to ruler - why ?

    CS5 is not honouring the relative position when cutting from one document then pasting to another.   In CS4 I would drag the ruler to a common element of both documents, then cut from one and paste in front in the other document.   This is no longer the case with CS5, it appears to be Art Board bound some how, and I dont want that becuase I can never be 100% assured the custom art boards are of the same size .... what happened Adobe , life used to be simple ?  Is there a software switch somewhere to have cut & paste adhere to relative ruler position ?

    Yeah I posted about this issue yesterday, glad to see others have been complaining about it. It's a huge issue, a dealbreaker as far as using CS5 or not. From the posts about labels and shrink wrap kinda sounds like there's some other folks in the thread doing flexographic work. I don't know if there's something about flexography that makes us desperately need to retain this feature, but so it is (I suppose since flexography uses so many different slightly different document sizes on a regular basis, compared to commercial which may only  use 4 or 5 radically different document sizes on a regular basis, it might affect us more).
    I put a call into Adobe about it yesterday. First level phone support said that on their end paste was working the way I wanted it. (He screen shared with my computer, I showed him the issue and he was mystified by it saying his CS5 was merrily pasting according to the ruler origin.) This makes it seem like, in contrary to Mr. Zimmerman, that this can be changed in a setting somehow. Note that support also called over their supervisor and they were both surprised to see me unable to paste in place (front/back) relative to the ruler, only relative to the document. He escalated the issue to second level support and said I should get a call back sometime late this week, we shall see. Obviously I can only trust 1st level support so much. I didn't screen share to him (only him to me) so for all I know (despite his assurances) he was accidentally working in CS4 or CS3.
    The weird thing to me about the whole issue is the change doesn't actually give anyone anything they didn't have before. Mr. Zimmerman seems to be saying that everyone and their brother was asking to be able to always paste according to the corner of the document, but in old versions that functionality was already present. If you wanted to paste according to the corner of the document you just double clicked in the top left corner (between your x and y rulers) to reset the rulers to the corner. Okay maybe people didn't want to reset their rulers after they paste, but it's a whole lot easier to reset a ruler than it is to be forced to paste things around a document without a ruler's help. I also understand that by adding in artboards (not a useful feature for me, but definitely a useful feature for most designers....old Freehand users will undoubtedly be leaping for joy) paste according to rulers becomes more problematic and they probably wanted to streamline things by default...but I still have a hard time imagining that Adobe would so screw over their customer base by totalling removing this functionality that has been so basic to Illustrator for so long by removing it entirely.
    I definitely second (sixth, seventh) the requests to add a paste according to ruler option  if my 1st level support guy was incorrect in his assessment that the functionality could still be turned on in CS5. I will post hopefully later this week with an update on my experience with 2nd level support.

  • Apple Mail Cut & Paste Problem...

    I have a problem with Apple Mail when I cut some text and paste it somewhere else within the message it doesn't go in where the cursor is located! Instead it pastes into what appears to be a random place elsewhere in the message usually at the start of the line or paragraph.
    It's really strange and completely unfathomable. The only solution I've found is to put in a couple of returns paste it in to the message then move the cursor up and delete the newly added line breaks.
    I thought it might be a font issue so I changed my default font from Arial to Trebuchet and it's still doing it. This doesn't appear to happen in any other application.
    This is not exclusive to Snow Leopard as it does it on my Mac at home which is running Lion.
    Any advice gratefully received.
    David

    David -
    I have also been experiencing this oddball aim issue when attempting to insert clipboard contents into a specific point in Mail. I am writing to lend credence to the contention that this is an Apple Mail issue that really should be fixed. Apple started the cut & paste revolution and the fact that one of their key software packages cannot paste properly strikes me as a bit ludicrous.
    This started happening on both my iMac and MacBook Pro a few months ago. It could be that it correlates with my use of three different styled signature files for three different e-mail accounts (I hadn't thought of the connection, so thank you, I had been wondering if they had altered something in one of their many security updates).
    I desired that the body text of my e-mail  default to something different from the style of my signature files. Mail is fairly limited in this area, so I include a top line my signature file that has the right style for my body text. Now I start all messages by overwriting that styled text, so my message font is as I want it. Is this the source of the problem?
    The inability to place text correctly isn't restricted to pasting something in via clicking on a particular spot in the e-mail. Odd things also happen if you use the directional arrow keys to move the cursor around with the keyboard and then command-V, or if you drag text to a certain spot, and when you release, it refuses to go there.
    There's some logic to the mistakes. The text is almost always placed a couple of lines above where the insertion point is blinking, and you can fool Mail sometimes by placing text in the middle of a bunch of new returns and then deleting the surrounding lines, but this is cumbersome and annoying.
    I hope Apple reads this, because it got so annoying that I switched to Outlook (Office 11) and it's terrific in some of the areas where Mail falters (work e-mail is Exchange). About the only thing that Mail does better is access my MobileMe folders much more quickly.
    Come on, Apple!

  • Disabled Copy & Paste in 29.01 is like losing an arm!! Need do-able workaround ASAP.

    I am beyond furious that all the workarounds that made copy and paste function have now been disabled in 29.0.1. The FF overlords are imposing their will on the masses. I am an adult and can make security decisions for myself. Losing cut & paste is like losing an arm. Before I switch another browser, does anyone know a workaround to restore this critical browser function? I have seen the javascript idea but it's a bit complicated. The Clipboard Helper plugin and altering configuration no longer work. No add-on works either. I am desperate for an uncomplicated fix. Anybody?!

    You should still be able to use the keyboard shortcuts (Ctrl+V, Ctrl+C, and Ctrl+X) to paste, copy and cut.
    As for web sites performing clipboard operations, see
    * https://developer.mozilla.org/docs/Web/API/ClipboardEvent
    If you absolutely have to, you can downgrade to Firefox ESR until this is resolved.
    * http://www.mozilla.org/firefox/organizations/faq/
    ''Feel free to vote for reports to keep track of any progress, but please don't post comments unless you have technical information to add. See [https://bugzilla.mozilla.org/page.cgi?id=etiquette.html the Bugzilla etiquette page] for details.''
    * [https://bugzilla.mozilla.org/show_bug.cgi?id=913734 Bug 913734] - Remove domain policy goop from CAPS
    * [https://bugzilla.mozilla.org/show_bug.cgi?id=1004260 Bug 1004260] - Firefox 29 broke clipboard access; restore the CAPS allowclipboard policy until the Clipboard API allows click-to-copy
    * [https://bugzilla.mozilla.org/show_bug.cgi?id=1012662 Bug 1012662] - implement click-to-copy and click-to-cut permissions (semi-trusted events)
    * [https://bugzilla.mozilla.org/show_bug.cgi?id=1013165 Bug 1013165] - Add "allow clipboard access" preference to about:permissions

  • Approve buttons are disabled in 2nd approver

    Hello,
    I have implemented the N-step approval BADI for BID Invitation just cut&paste from the sample. The issue is Approve, Reject and Hold buttons are disabled in approval screen (saplbbp_bid_inv_300.html)in the 2nd approver. No problem for the 1st approver.
    SRM50(SRMServer5.5) SP5
    Basis 700 SP8
    Any idea ?
    Regards,
    Masa

    Hi Masayuki
    Maintain entries in tcode SWL1
    Maintain Attributes EC_DECISION and EC_MAIL for those tasks that exist within your WF template.
    You can also go through the IMG path. "Dynamic column integrator or something like that". I dont have a system in front of me.....
    Please reward points for helpfull answers
    Sundeep
    Message was edited by: Sundeep Ravande
    Message was edited by: Sundeep Ravande

  • Disabling copy paste screenshot function from webdypro output

    Hi,
    I am working on a webdynpro application. I have used formatted text view element the outout view. The requirement is when this text is displayed in output it should not be copied pasted nor screenshot can be taken for security reason.
    This means when I execute the program and the text gets diesplayed in Internet Explorer copy paste function should be disable.
    Printscreen option should also be disabled.
    Waiting for your response.
    Regards,
    Abhishek

    I don't believe that anyone ever said that you could disable cut and paste.  This too is a function of the browser interacting with the OS.  There is nothing that you can do from Web Dynpro to effect that.
    I did a google search to how to avoid cut and paste in the browser.  Even with full control over javascript and the HTML rendering (which you don't have in Web Dynpro) this is very difficult to do.  Some suggestion are to use a CSS with a transparent image overlay or to render an image with the text.  Even some of these approaches can be worked around by someone persistent enough - by viewing source for instance. 
    Also avoiding the screenshot is pretty much impossible and certainly isn't the responsibility of the application.

  • How can I Cut & paste an address from one address book to another on my PC.

    My work computer has 3 address books - 1 personal address book, 2 collected address book, 3 work related address book.
    After a couple of years I would like to tidy up my address books & cut & paste some of them from here to there. However there seems to be no cut & paste or copy & paste feature that I can locate anywhere????
    I can't drag & drop an address from one to another either.
    Can anyone please help
    BevN

    Cut and paste a whole contacts information has never available because it entails different components. Cut/Copy and paste has always been available if you are only selecting one part of the information, but this means you have to open a specific contacts Properties.
    '''How to drag and drop contacts between address books:'''
    In the left Directory Pane, select the address book containing the contact you want to move. You should see a list of contacts in the right Contact Pane.
    Drag & Drop process:
    * Left click and hold down on a contact in the list to grab, then drag that contact to the left and hover over the address book where you want to put the contact. Then release the mouse button to drop into that address book.
    You can move more than one contact.
    * Hold down 'Ctrl' key and use mouse to select and highlight various contacts.
    * then use the D&D process - (left click, hold down on any highlighted contact to grab all highlighted contacts).

Maybe you are looking for