Mouse event not working on JTable in JAVA 1.4.2

mouse event is not recognised on empty table when using with java 1.4.2. Please specify if there is any chnge done for mouse event capture for table from java 1.3.1 to java 1.4.2.
since mouse events are working fine for JTableHeader.
if anybody have an idea please let me know.

Hi
JTable is there on JPanel . same code is working in JAVA 1.3.1
actually its a bug in java 1.4.2 ( ref. bug_id=4940522 )
here is the code reference..
public class TableEditor extends JPanel
�implements ListSelectionListener, Selector, Editor
private JTable�myTable;
private JPopupMenu myPopup;
private Vector�myActions;
private Vector�myListeners;

public TableEditor(String anAssociation, Editor anEditor, int type)
super(new GridLayout(1,1));

myListeners = new Vector();
myActions�= new Vector();
myPopup�= new JPopupMenu();
myTable�= new JTable();
��
myTable.getSelectionModel().addListSelectionListener(this);
myTable.addMouseListener(new MouseAdapter() {
�public void mouseClicked(MouseEvent me)
�{
� if ((me.getModifiers() & MouseEvent.BUTTON3_MASK) != 0)
� {
��// Update actions in case ListSelectionModel are out of sync.
��for (int i = 0; i < myActions.size(); i++)
��{
Object o = myActions.elementAt(i);
if (o instanceof SelectorAction)
((SelectorAction)o).check();
���}
myPopup.show(myTable, me.getX(), me.getY());
�}
// Added mouse listener to JTableHeader
// This is a temporary solution to open popup menu on blank table,
// as in Java 1.4.2 no mouse event captured on blank table.
// So for now we will capture the event from the table header.
JTableHeader myTableHeader = myTable.getTableHeader();
myTableHeader.addMouseListener(new MouseAdapter() {
public void mouseClicked(MouseEvent me)
�{
if ((me.getModifiers() & MouseEvent.BUTTON3_MASK) != 0)
// Update actions in case ListSelectionModel are out of sync.
for (int i = 0; i < myActions.size(); i++)
��{
Object o = myActions.elementAt(i);
if (o instanceof SelectorAction)
((SelectorAction)o).check();
���}
myPopup.show(me.getComponent(), me.getX(), me.getY());
� }
�});
The solution given is temporary ( adding JTableHeader component)..
we want to retain the same functionality .. mouse event should get captured on empty table only..

Similar Messages

  • Logitech mouse buttons not working in photoshop cc 2014

    logitech mouse buttons not working in photoshop cc 2014 winds 8.1. Is this a common problem?
    I have updated the latest drivers and have a few buttons programmed with keyboard shortcuts that used to work in previous versions of Photoshop but don't work now.
    Scrolling with mouse in bridge stopped working in cc butI see it is now working.
    any ideas?

    Many Photoshop extensions are not compatible with Photoshop CC 2014 for Adobe removed support for Flash Panels in CC 2014. Many extensions panels are flash based.  Check with the developer to see if their blendmein extension works with CC 2014.
    Adobe does not maintain Photoshop so it backward compatible with prior versions of Photoshop.  This brakes things like action scripts plugins extensions etc. Keep old version of Photoshop installed....

  • APPLE mouse & keyboard not working with Windows (Bootcamp)

    I installed Leopard and Windows XP on my Mac Pro. The installation went very smoothly. Only problem I have is that my Apple wireless keyboard and mouse do not work on Windows (frozen) although they work fine on Leopard. I tried a Logitech wireless trackball and it works fine on both Windows and Leopard. Any suggestion?

    Thanks. I upgraded from Tiger and downloaded Bootcamp from Leopard Installation disc ( I did not have a beta version ). I then installed Windows XP SP2 ( brand new, just bought for that purpose ). Wonder if Mac wireless keyboard and mouse are compatible with Window. Everything else work beyond my expectation.

  • USB mouse does not work

    hi All
    I bought a new HP laptop few days ago,when I installed Win7 pro on it after a few minutes, the usb mouse stopped working. Its light still lights up ,but the cursor does not react. The drivers of the device are installed and working properly. the mouse will
    not work until I click "scan for hardware changes"in Device Management . but when I restart the computer, it happend again . but win7 home edition seems does not have this problem. please help.  thanks  

    Hi,
    I suggest updating the latest BIOS and chipset from HP site, then reinstalling USB controllers to check the result. If any USB hub is used, please bypass it.
    http://blogs.technet.com/b/asiasupp/archive/2010/11/23/error-message-one-of-the-usb-device-attached-to-this-computer-has-malfunctioned-and-windows-does-not-recognise-it.aspx
    Also, please perform
    clean boot, disable your antivirus and firewall
    temporarily to avoid any blocking. If the issue persists in clean boot, test the issue in Safe Mode and Device Clean boot.
    Device Clean Boot
    1. Go to Device Manager
    2. Expand "Sound, video and game controllers".
    3. Right Click on Audio device and choose disable.
    4. Please use the same method to disable other dubious hardware such as: internal modem, and CD-R drive. Please note some devices such as video adapter are not available
    to be disabled.
    5. After that, restart the computer and then test the issue. If it does not occur, you can enable the device one by one to narrow down this issue.
    After you found the device that causing the problem, you can resolve by installing last driver or replacing the device.
    Best Regards,
    Niki
    Please remember to click "Mark as Answer" on the post that helps you, and to click "Unmark as Answer" if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

  • External mouse scrolling not working

    The scrolling function of my external mouse does not work when the MacBook Pro is not plugged in with its powercord. The mouse buttons seem to be functioning.  So does as an external keyboard. My wife has the same problem (using 10.6.2 OS). There are no options in the System Preferences that deal with this. Is this just an oversight by Apple? This basically makes using an external keyboard and mouse a nonviable option for a laptop unless you are near an electric outlet. If you know of a workaround I would appreciate the information. If not, it is something Apple will have to correct as it a pretty obvious oversight.
    Thanks in advance for any advice.
    Tony

    Check your settings when it is unplugged to make sure they are still properly configured.  You might even want to try and disable the trackpad when a mouse is being used.  I would also check out USB Overdrive (Shareware).

  • My wireless keyboard and mouse do not work on my All-In-One computer?

    Q.: My wireless keyboard and mouse do not work on my All-In-One computer?
    A.: If your wireless keyboard and mouse do not work even after changing the batteries, please try re-syncing them by following these steps.
    1. Make sure the computer is on, plug in the USB receiver. Push the button on the USB receiver until it flashes blue.
    2. While the receiver is still flashing, press the red connect button on the keyboard (Make sure the batteries are installed). The USB receiver should stop flashing after pressing the button on the keyboard. It may take up to 8 seconds to sync.
    3. Repeat the same process for the mouse. Push the button on the USB receiver, then press the connect button on the mouse (Make sure the mouse is on).
    Note: This applies to all MSI All-In-One computers that include the ES500W wireless keyboard and SW130 mouse.

    "This machine has an added 4 USB ports, could this be causing a problem?
    It definitely could be the source of the problem. Perhaps the PCI card was bumped loose during shipping?
    Have you tried removing the card? That's where I would start.
    Keep us posted.

  • Mouse is not working properly on a one month old HP Pavillion 15-NO28US

    I'm sure it's already been talked about on here, but I haven't found a successful fix or the same exact problem as I'm having. I went thru the latest Windows 8.1 update recently (at least I think it was the update) and when I restarted my computer yesterday the mouse was not working properly. Like a lot of other people who are complaining about it, the two-finger scrolling and other similar features are not working, but what really bothers me is the the mouse is almost acting like it was changed to a left handed mouse. I've checked the settings and it is still set on right-handed, but when I click the left mouse button the small window opens up next to where I clicked, which has the copy, delete and paste options (and other regular options) in it. When I click the right mouse button, nothing happens. Double tapping on the touchpad doesn't do anything either. I downloaded and install the latest synaptic drivers and nothing happened. I even performed a system recovery last night to reset all setting and it's still not working. This really sucks because I've only had this computer for about a month and I've already lost everything I've put on it...most importantly all of my school work and music apps. Is there anything to fix this or can anyone tell me what's going on with this stuff, before I have to call into HP and have a melt down?

    Hi Kevin3047,
    Thank you for your query, I will do my best to assist you!!
    I understand that after updating from Windows 8 to 8.1 your mouse is not performing correctly. You have tried the built in troubleshooter but to no avail.
    You checked the settings and they appear ok, but when you click the left mouse button the small window opens up next to where you  clicked, which has the copy, delete and paste options (and other regular options) in it. When you click the right mouse button, nothing happens. Double tapping on the touchpad doesn't do anything either. I grasp that you did a recovery but it did not help.  You also stated you lost your data once, and that in itself is extremely aggravating, I agree.
    Here is a step that may help.
    Go to the Command Prompt and right click on it to run as Administrator
    type sfc /scannow and press enter.  This will scan for corrupted files and try to repair them.
    Here are links to two documents that may aid with this process.
    Troubleshooting Mouse Problems (Windows 8)
    Using and Troubleshooting the TouchPad or ClickPad (Windows 8)
    Would you also please try a clean boot to see if it persists. Here is  a Windows document to assist you.
    How to perform a clean boot in Windows
    If none of this has alleviated the issue, I suggest you do a  Refresh Your PC to Resolve Problems (Windows 8).
    If the issue still pesists, I would do a recovery again.  You will be prompted during the recovery to backup your personal files to prevent data loss. I would suggest you choose yes, to prevent data loss.
    Performing an HP System Recovery (Windows 8)
    Restoring Files that were Backed Up Using HP Recovery Manager (Windows 8)
    This will take it back to factory. Here is a document on Updating Windows 8 to 8.1 to assist you with doing the update again.
    If you are still experiencing the issue, as @visruth stated I would contact HP support for assistance.  They are able to remotely log onto your system to help with this difficulty.
    Please call HP technical support at 800-474-6836. If you live outside the US/Canada Region, please click the link below to get the support number for your region HP Technical Support Sitemap.
    Good Luck!!
    Sparkles1
    I work on behalf of HP
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos, Thumbs Up" on the bottom right to say “Thanks” for helping!

  • PS/2 Mouse does not work anymore

    I was playing Halo on WinXP and I had to switch my wireless mouse with a wired mouse because I was not getting a good response out of it. When I wanted to switch back the mouse did not work. I tried a number of different mice and none of them work. If I use a USB mouse it will work in the USB port. This causes a problem for when I am running Linux on my machine.
    My question is, are there any known problems with the PS/2 mouse port on the SIS 645DX Chipset board (645E Max Series).
    OR
    Has anybody had a similar problem to this?
    I searched the posts but there were quite a few on this board. Too many even after I filtered out junk.
    Thanks a bunch guys.

    Well it turns out that I needed to reboot with the mouse plugged in. That was an easy fix. I can't believe I didn't do that.
    Side note, Why do you say it is bad for me to have the receiver on the top of the computer? Is there some interferenece?
    Thanks for the help.
    Roderic J

  • Onclick and doubleclick event not working in CC

    hi..  onclick and doubleclick event not working in CC..  how to get these events to work?
    Please advise anyone. Thanks alot!

    Is your event target a ListBox?
    In that case there are serious issues to deal with:
    http://indiscripts.com/blog/public/ScriptUIEvents.pdf
    @+
    Marc

  • Wireless mouse does not work

    my wireless mouse batteries formed buildup around them. Now my mouse does not work, is there a way to make it work after this happens?

    When checking your mouse or keyboard batteries, assuming the mouse is paired.
    Turn off the device.
    Remove the batteries,
    Thoroughly clean the terminals both inside the battery compartment and on the batteries themselves.
    Replace or renew the batteries.
    Turn on the device.   You should get a steady green light if the devices are paired.
    Click the mouse twice to activate it.
    Whether you use regular or rechargeable batteries you should buy the best. Discounted or unbranded batteries are likely to give a depleted performance and may be of irregular size, often leading to connection problems.   Apple’s own brand, Duracell, Energiser and appear to be the best.

  • My apple mouse is not working.  The pointer will not move on the screen and it keeps turning off.

    My apple mouse is not working.  I can get it to connect but it will not move the pointer.  Left and right click is working, scrolling, just cannot move the pointer.  Also, I have replaced the batteries (numerous times) but the green power light turns off after a few minutes.  Any suggestions?

    How about clean up LED hole of mouse?

  • My mouse is not working correctly after upgrade to ITunes 11

    I upgraded to iTunes 11 for WinXP and now my mouse is not working correctly. No double clicks, no right button function and sometimes refuses to do simple left click options. What can I do?
    I've tried new mouse drivers and checking the settings in Control Panel but no joy so far.
    Driving me mad and taking me three times longer to do anything as I look for keyboard solutions.

    I'm facing the same problem too on Windows 8. No mouse clicks (just 'ding' sound whenever trying to click anything).
    I could work around it on Windows 8, but ultimately have to restart my PC to get back mouse functionality.
    I wasn't quite sure which app is to blame, but ultimately concluded it's iTunes 11. As this behaviour always concided with having iTunes running in the background for 15-20 minutes (usually listening to podcasts) and never seems to happen when iTunes 11 isn't running.
    Don't know what to make of this, I'm currently playing my podcasts through Windows Media Player instead. I'll hopefully try running iTunes 11 in Windows 7 Compatibiliy mode to see if that helps.

  • Mouse click not working

    i set up a new battery, i pressed command D without not cause. After that my mouse is not working, its noly moving and scroll. Does not CLick.what to do now?

    Please reset the SMC Control, Apple explains how in:
    http://support.apple.com/kb/ht3964

  • Installing windows 8 with bootcamp 5. Have to make a choice at personalize but mouse is not working.  What can I do?

    installing windows 8 with bootcamp 5. Have to make a choice at personalize but mouse is not working.  What can I do?

    I solved my problem by using a USB mouse and a USB keyboard instead of bluetooth

  • Wireless mouse will not work at the top of the page on ANY website while running Firefox 7.0.1

    I am currently running Firefox 7.0.1 and have not had many problems until today. I have noticed that my wireless mouse will not work at the top of any website. This means I cannot log into many sites. I have also noticed that during page downloads, I have to move the mouse in order for the page to load or it just pauses. Any help would be appreciated!

    If it does work in Safe-mode then disable all extensions and then try to find which is causing it by enabling one at a time until the problem reappears.
    *Use "Disable all add-ons" on the [[Safe mode]] start window to disable all extensions.
    * Close and restart Firefox after each change via "File > Exit" (Mac: "Firefox > Quit"; Linux: "File > Quit")
    Se also:
    *https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes

Maybe you are looking for