Disable left-click on buttons

Hi guys!
I need to disable the left-click event on a button, but not the right-click one! I don't want to catch the mouseClickedEvent and then to find if it was the left or the right button to be pressed because left-clicking on a button makes it "appear pressed", so the user wonders "What's going wrong with this button??!!"
Any help?

Updates:
Looking at the source code of javax.swing.plaf.ButtonUI.BasicButtonUI I saw that there's a call to model.isPressed(). Following this clue I found the method javax.swing.AbstractButton.getModel() and ...
yes, this can be a way to intercept the event (I did not try), but it's not the answer to my question: I got a java.awt.Button :(
Why did I choose AWT???

Similar Messages

  • Everytime i press and hold my left click mouse button, it automically highlights everything from that point to the top of the page

    Every time i press and hold my left click mouse button, it atomically highlights everything from that point to the top of the page. Also note, if i'm holding the left click on the scroll bar it goes back to the initial location even when i try to drag it up or down.
    Opened up internet explorer and the problem does not occur there.

    '''Try Firefox Safe Mode''' to see if the problem goes away. [[Troubleshoot Firefox issues using Safe Mode|Firefox Safe Mode]] is a troubleshooting mode that turns off some settings, disables most add-ons (extensions and themes).
    If Firefox is open, you can restart in Firefox Safe Mode from the Help menu:
    *In Firefox 29.0 and above, click the menu button [[Image:New Fx Menu]], click Help [[Image:Help-29]] and select ''Restart with Add-ons Disabled''.
    *In previous Firefox versions, click on the Firefox button at the top left of the Firefox window and click on ''Help'' (or click on ''Help'' in the Menu bar, if you don't have a Firefox button) then click on ''Restart with Add-ons Disabled''.
    If Firefox is not running, you can start Firefox in Safe Mode as follows:
    * On Windows: Hold the '''Shift''' key when you open the Firefox desktop or Start menu shortcut.
    * On Mac: Hold the '''option''' key while starting Firefox.
    * On Linux: Quit Firefox, go to your Terminal and run ''firefox -safe-mode'' <br>(you may need to specify the Firefox installation path e.g. /usr/lib/firefox)
    When the Firefox Safe Mode window appears, select "Start in Safe Mode".<br>
    [[Image:Safe Mode Fx 15 - Win]]
    '''''If the issue is not present in Firefox Safe Mode''''', your problem is probably caused by an extension, and you need to figure out which one. Please follow the [[Troubleshoot extensions, themes and hardware acceleration issues to solve common Firefox problems]] article to find the cause.
    ''To exit Firefox Safe Mode, just close Firefox and wait a few seconds before opening Firefox for normal use again.''

  • After updating to v. 24.0 (and restarting) ALL add-ons (regardless whether they work or not) are marked "(disabled)", and clicking Enable button does nothing

    After updating to v. 24.0 (and restarting, several times) ALL add-ons (regardless whether they work or not) are marked "(disabled)". I tried clicking "Enable" button for each add-on and nothing happened. There is only one add-on which is marked as incompatible with this version (but it was also incompatible with previous version, and so marked).
    Clicking "Update Add-ons", gives a short list of add-ons but "Install Updates" button is pale and doesn't work. I can only sort list by name or last update.
    Also, I disabled Ask Toolbar and that went well. When I click "Enable" button (button works ONLY for this add-on) it takes forever to get note: “Ask Toolbar will be enabled after you restart Firefox”, I used to get this info in seconds time before this update. (I do not really want Ask Toolbar, I just used it to see whether if I disable and then enable an add-on might do the trick.)
    Bottom line – I can not tell if add-on works (i.e. if it is enabled or disabled) unless I try using it.
    Even when I posted this question and installed Troubleshooter, it's also marked as "(disabled)"

    You're welcome
    Are this screenshots from an extension window because the built-in about:addons page looks different?

  • PS CS6 - Left Click Mouse Button Way Too Touchy

    I'm looking for a solution to an annoying problem with Photoshop CS6. Here's the problem:
    When holding down the left mouse button in the scroll bar area for just a fraction of a second too long, the scroll bar moves several positions. In the past, it wasn't this touchy. It's so touchy that it's impossible to CONSISTENTLY click once and make the scroll thingy move just one position. In previous versions, it works like a charm. Is there a way to adjust this mouse issue?
    I use it on every image for cloning so that I can check one section at a time. For this reason, I've now gone back to CS5, but also because CS6 crashes on me and it sometimes gets stuck on Auto Saving files (possibly because they're big).

    This is easily reproduced.  Just click and hold on the scroll bar for the main image preview.
    With Photoshop CS5, when you do this the scroll thumb moves once, then waits about half a second, then quickly repeats movements until it reaches where you have clicked.
    With Photoshop CS6, it just immediately starts repeating, without the longer initial delay.
    I don't know about Macs, but Photoshop CS5's behavior is Windows standard behavior.  Photoshop CS6's behavior is wrong.
    I have to ask (of any Adobe folks reading), why would scroll bar operation be changed in this way?
    -Noel

  • Left click stopped working all of the sudden. Help?

    Earlier today, my MacBook Pro's trackpad button was working just fine. Now it's not. Whenver I press it, nothing happens. I can still move the cursor without a problem. I connected my Mighty Mouse to my MB Pro and everything in my MM works fine, except for the left click. Then I decided to shutdown my MB Pro and reboot it, hoping that it would get rid of the problem. After it turned back on, I realized that the left click is still not working, both on the trackpad and my MM. I even reseted my PRAM and that didn't fix my left click problem at all.
    How do I get the left click working again on BOTH my trackpad and my MM?
    Here are the specs for my MB Pro:
    - MacBook Pro with 15 inch screen (Late 2006)
    - 2.16 GHz Intel Core 2 Duo Processor
    - Running on the latest version of Lion (10.7.5)
    - 3 GB of RAM installed

    I have this problem too! I just posted a question - how did you fix it or did it just go away? Mine computer is unuseable. Left click does some things but not all.
    Here's my post
    I can open MAIL but the MAIL menu doesn't appear at the top, and the LEFT click doesn't work properly, but right click does work! Command Q doesn't close the program, it's like it's half open. I can get rid of the page with the LEFT clicker (red button) and I can sort of select stuff in an email but it's grey. The buttons along the top work (Get mail, new message etc), but if I open a new message I can't do anything with it, there's no cursor.
    Other programs the same (like Excel)
    I restarted with the buton on the back, it'll work ok for a few minutes then not so ok. I managed to copy some files onto a hard disc and that all worked fine.
    It seems to be all in the communication between the mouse/keyboard and the computer. Yes I have tried a wired mouse and keyboard, with the bluetooth one off, no help, same result.
    This is not a result of new installation. There's no half-dead mouse hiding somewhere.
    Help! Thanks

  • The left-click options in the web browser are disabled in the latest version

    In all the previous versions of firefox I've had no issues in the drop down menu when left-clicking to either open a link in a new tab or save highlighted text or even saving an image to my drive. However now with the latest update (20.0.1) I have come across something which disturbs me by the full length of the drop down menu (too long, too much stuff on it) and half the options are disabled, which makes it harder for me to surf the web as I am used to doing. I have taken a screenshot of my issue . I hope it will help. Also, that my OS is windows 7. http://www.darkworlds.se/images/other/firefx20bug.jpg

    This is a problem related to having an outdated version of Firebug, most likely you've disabled automatic update of addons.
    The easiest way to fix this is to go to Tools -> Addons, and then clicking the wheel button up near the search field. From there you choose "Check for Updates" and unless you need specific versions of an addon, choose the "Update addons automatically" while you are there.
    You will most likely have to update Firebug twice, as it updates to an outdated version, and from there to the newest one.
    This is the solution I stumbled upon as I had the same exact problem, where I tried creating a new profile and the likes.

  • CP 6 disable slides transitioning on left click

    Hello,
    I'm having a slight issue with CP6. I'm trying to set up my project using back and next buttons, but once the slide finishes playing, if i left click anywhere on the screen, it proceeds to the next slide.
    my set up:
    I am importing PowerPoint 2007 files into my project with High Fidelity, with transition set to automatic.
    I am using master slides with a back and next button on them already, with the check box selected for "Pause project until user clicks".
    I don't have this issue if i import my slides without high fidelity. (however i need this selected in order to capture all of my poewrpoint functionality such as drop shadows.)
    bump

    I have mananged to figure what the probelm is after a few hours. Basically it was a hardware malfunction of the trackpad, however if I just disabled the track pad the cursor was still jamed. I had to do a shut down plug in an external mouse, then without touching the tracpad at all disable using the external mouse. Now it works fine just with the external mouse.
    Hope this helps anyone who has the same probelm as me.

  • I used to open, bbc radio 2, with a left click on the 'listen' tab? this now longer responds, I have to now right click the mouse button and open link in a new tab? whats wrong

    I used to be able to open BBc Radio 2 via the 'Listen' link with a left click of the mouse button, this nolonger works, I now have to right click the link and 'open link in a new tab'
    I must have disabled something?
    If you can help then please make it easy for me to understand.
    Thanks
    Regards
    Rj

    2 Solutions found in [http://support.mozilla.com/en-US/questions/791244]
    the user cor-el has a method that does not require any add-ons. He States
    This code in userChrome.css will move "Open Link in New Window" to the top of the context menu.
    <pre>@namespace url("<a href="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul</a>"); /* only needed once */
    #contentAreaContextMenu &gt; * { -moz-box-ordinal-group: 2; }
    #context-openlink { -moz-box-ordinal-group: 1 !important; }</pre>
    the user jay_ff shows how to do it using the Menu Editor Add-on
    1. Install the Menu Editor add-on from https://addons.mozilla.org/en-US/firefox/addon/menu-editor/ .
    2. After the installation, go to Firefox> add-ons (or simply use Ctrl+Shift+A)
    3. Go to the Menu Editor "Options"
    4. In the "Main context menu," simply grab the "Open link in New Tab" and place it below the "Open Link in New Window"
    5. and Voila! You may also change other menu options if you want to!
    I tried jay_ff method first and found that indeed changing the Main Context Menu did cause the hotlink context menu to change as well.

  • MBP 2008 Click disabled on trackpad, left click not working on mightymouse & wacom pen tablet.

    Hello,
    i have a problem with a Macbook pro 2008.
    The trackpad click button is not working anymore
    (i've already tried to remove the battery underneath and push the wire that's connected to the pad,
    nothing changed).
    I've managed to sync a mightymouse, left click is disabled as well
    (but not right click).
    Then i've tried with a wacom tablet. Right click works, but not left.
    (also tested switching buttons, yet no left click).
    In conclusion :
    left click is not functionning with any of the peripherals,
    left & right click  are disabled on the trackpad.
    I've also tried "tap to click" without success.
    Does someone have any idea of what is happening?
    And how could a have the left click back?
    Regards
    F

    Since you have a 2014 MBP, by definition it is in the 1 year warranty period.  Make an appointment at an Apple store genius bar and have the technicians sort the unit out for you.
    Ciao.

  • When I left-click the home button, how can it open my home page in a new tab?

    I thought it used to do that. I had to do a clean install of Windows, I believe I was only on FF 22 or 23 when this happened. Now I'm on FF 26 and obviously all my settings are gone.
    I'm 99% sure that when I left-clicked on my home button, it opened my home page in a new tab. I know I can middle-click to get that affect, but it used to be left-click and I do that automatically now. But I don't want to lose the current window I have up, so something's wrong.
    Anyone know how to fix this? Or an add-on to do this?

    If you hold down the Ctrl key while left clicking the Home button then the home page opens in a new tab.<br />
    You can also middle-click the home button like you can with any other link

  • Fire a left click when the right button is pressed

    I am working on a small program with a text area and mouse functionality. I have all my listeners in place but I need one additional feature and I am unsure how to go about implementing it. I want to be able to fire a left click when the right button is pressed.
    The reason is because right clicking does not move the caret around the text area. I need to be able to move the caret with a right click so I can then invoke another method to do some other functionality that is associated with the right click. Any method is acceptable as long as a right click will result in the caret being able to move to a location much like a left click can.
    all help is appreciated. Thanks.

    I'm not sure if this is "better", and my guess is that it isn't, but how about using a Robot object here to create a left mouse press and release? For instance,
    import java.awt.AWTException;
    import java.awt.Robot;
    import java.awt.event.InputEvent;
    import java.awt.event.MouseAdapter;
    import java.awt.event.MouseEvent;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JComponent;
    import javax.swing.JScrollPane;
    import javax.swing.JTextArea;
    public class RightClickAsLeft
      private JPanel mainPanel = new JPanel();
      private JTextArea area = new JTextArea(20, 50);
      private Robot robot;
      public RightClickAsLeft()
        try
          robot = new Robot();
        catch (AWTException e)
          // TODO Auto-generated catch block
          e.printStackTrace();
        mainPanel.add(new JScrollPane(area));
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < 18; i++)
          for (int j = 0; j < 80; j++)
            sb.append((char)(40 + j));
          sb.append("\n");
        area.setText(sb.toString());
        area.addMouseListener(new MyMouseListener());
      public JComponent getComponent()
        return mainPanel;
      private class MyMouseListener extends MouseAdapter
        @Override
        public void mouseClicked(MouseEvent e)
          int button = e.getButton();
          if (button == MouseEvent.BUTTON3)
            if (robot != null)
              robot.mousePress(InputEvent.BUTTON1_MASK);
              robot.mouseRelease(InputEvent.BUTTON1_MASK);
      private static void createAndShowUI()
        JFrame frame = new JFrame("RightClickAsLeft");
        frame.getContentPane().add(new RightClickAsLeft().getComponent());
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.pack();
        frame.setLocationRelativeTo(null);
        frame.setVisible(true);
      public static void main(String[] args)
        java.awt.EventQueue.invokeLater(new Runnable()
          public void run()
            createAndShowUI();
    }Edited by: Encephalopathic on Apr 10, 2009 9:59 AM

  • Left click button not working on mouse

    Using an HP Pavillion g series notebook with windows 7 and all of a sudden my HP wireless mouse left click button doesn't work. checked to see if it was clean, changed the battery too.  Right click buttonis working as left click now. Driver software is upto date.  Only 2 years old with light use.  What's up?

    I also get what looks like tiny barcodes to the top right of my mouse pointer.
    That is usually a software corruption problem.
    Disk Utility ( Repair Disk ) is a good place to start.

  • Let's say I'm in my email, and I double click the button to the left of the screen and it then shows the multiple screens I've looked at already. How do I clear those already seen pages?

    If I'm in my email acct, I click a hyperlink to another page and then to go back to my email page, I double click the button to the left of the screen and it shows a slide list of pages I have recently been to. How do I get rid of that? Or clear the pages?

    You mean the multi task bar at the bottom?  In iOS7 there is a big preview box above each app in the bar.  Just swipe it up and away.

  • Left Nav lost after clicking submit button in iView

    Hi Community,
    I created an APC called CreateOrder which implements AbstractPortalComponent. This component acts as controller. In doContent() method, It checks if the create order submit button is clicked or not, if no, it  returns createOrder.jsp page, if yes, it returns createOrderResult.jsp page. Everything works fine except left navigation disapear after I click submit button createOrder.jsp and createOrderResult.jsp shows up. 
    by the way I can create a createOrderIview using the APC component, able to see createOrder.jsp page and have result page shows up.
    Anyone know what problem here? any help/sugguestion are very appriciated.

    Make sure your iView isolation mode is set to URL...
    Cheers

  • A java virus disabled the click + at the left to open new tab. I have reinstalled firefox but the problem is not fixed. what do i do to fix this?

    A java virus disabled the click + at the left to open new tab. I have reinstalled firefox but the problem is not fixed. what do i do to fix this?
    admins of forum feel free to edit post.

    Try disabling the Ask Toolbar extension.

Maybe you are looking for

  • The problem about the signal of JNI

    Hello, When the system (it creates by the C language) created here is operated on Solaris and javaVM is operated using a JNI, the phenomenon which the core file outputs within the JIT compiler of java (libsunwjit.so) has occurred. Although it had gen

  • Crash in Flash CS4

    I can't open a particular FLA file in my CS4.. is there any way for me to open it? And if not in Cs4, can you recommend other Flash versions like CS3 where I can open my FLA file. Thank you!

  • Loss of GPU acceleration after lastest CC update.

    I recently upgraded to the CC programs. I still have a project to complete with my previous version of Premiere Pro CS6. After the latest CC update I lost my GPU acceleration and get the following error message. "Missing Renderer This project was las

  • Exec XP_CMDSHELL cannot find store procedure problem

    I run EXEC sp_configure 'xp_cmdshell', 1 Message is"....change from 1 to 1 " Then EXECXP_CMDSHELL 'Dir N:' cannot find store procedure xp_cmdshell I check master database. No dbo.xp_cmdshell under store procedure. How to fix it? I need run command EX

  • Spilled Liquid on my All-in-one.

    I tipped a glass of juice on my HP PhotosmartC3140 All-in-one.  At first I didn't think I spilled that much but then all the lights starte flashing.  I turned it off and tried to dry it ff as best I could. But now, whenever I turn it on, the lights k