Results 1 to 7 of 7
- 03-15-2009, 02:07 PM #1
Member
- Join Date
- Dec 2008
- Posts
- 99
- Rep Power
- 0
change the delay between double click in mouse listener
Hello
I have mouse listener - work fine beside one thing -
I need to increase the delay between two clicks. the user for my programs dont like to click fast..
How can I increase the premited delay ? ( here my code
}Java Code:public void mouseClicked(MouseEvent e) { if (e.getClickCount() == 2) { JList l1 = (JList) e.getComponent(); int ind = l1.locationToIndex(e.getPoint()); System.out.println(listModel.get(ind)); } }
- 03-15-2009, 04:40 PM #2
Senior Member
- Join Date
- Jan 2009
- Posts
- 671
- Rep Power
- 5
Interpretation of a double click vs. two single clicks is done by the OS. Your users need to adjust the double click rate using the utility your OS provides. In Windows, go to the mouse control panel.
- 03-15-2009, 05:31 PM #3
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Working on with this using Java application seems mess to me. What's the point doing this in this way, can you explain a bit?
- 03-15-2009, 06:14 PM #4
Member
- Join Date
- Dec 2008
- Posts
- 99
- Rep Power
- 0
explain a bit?Working on with this using Java application seems mess to me. What's the point doing this in this way, can you
I'm kind of stuck with it. I started this project and learn java in the same time .
Any way - that what I have. You have any idea how to increase the delay between two clicks ?
- 03-16-2009, 07:48 AM #5
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
As toadaly explain in his last post, this is related with the OS. So what's the point here. User wants to change OS settings through a Java application. Accessing the OS utilities on Java is not an easy task, as far as I know. You have to deal with Windows OS using Java.
- 03-16-2009, 08:10 AM #6
Member
- Join Date
- Dec 2008
- Posts
- 99
- Rep Power
- 0
I'm using unix
- 03-17-2009, 02:23 AM #7
Senior Member
- Join Date
- Jan 2009
- Posts
- 671
- Rep Power
- 5
The KDE has a similar mouse control panel. Although it is *possible* to change the double click rate for your program, it's a bad idea. Your program will then behave differently than everything else.
If this is your only customer and you don't mind writing throwaway code you won't be able to use anywhere else, and they demand it, then AbstractButton.setMultiClickThreshold() should work for you. Again though, this is not advised.
Similar Threads
-
How to detect double click with a JFrame
By Jary316 in forum New To JavaReplies: 3Last Post: 01-05-2009, 08:39 PM -
mouse click do not work after repaint
By nobody in forum Java 2DReplies: 8Last Post: 12-07-2008, 04:43 PM -
mouse click alert
By amir in forum AWT / SwingReplies: 1Last Post: 08-05-2008, 10:42 PM -
Problem in mouse click n repaint
By Preethi in forum New To JavaReplies: 4Last Post: 07-04-2008, 11:16 AM -
Mouse Right click option not working in solaris and linux OS
By dinesh kaushik in forum AWT / SwingReplies: 2Last Post: 11-21-2007, 04:02 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks