double click « Event « Java Swing Q&A





1. JNLP File Association: How do I open the file which was double-clicked on?    stackoverflow.com

I've got the following JNLP:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jnlp PUBLIC "-//Sun Microsystems, Inc//DTD JNLP Descriptor 6.0.10//EN" "http://java.sun.com/dtd/JNLP-6.0.10.dtd">
<jnlp spec="6.0.10" version="1.63" codebase="http://foo.example.com/msi" href="Foo.jnlp">
    <information>
        ...

2. identifying double click in java    stackoverflow.com

I want to know how can we perform action when mouse is double clicked in a component.

3. java - catch event of double click on icon in tray    stackoverflow.com

I want to make my form visible when I double click the tray icon?
How do I catch the double click on the icon?
Thanks.

4. How can I create a java GUI so when I double click a .jar it launches a java GUI that acts like a console    stackoverflow.com

I have some code that requires input and output and I want to make this into a .jar file that when double clicked can launch a GUI console like application that ...

5. Swing Jar file will not execute via command line or double-clicking    forums.netbeans.org

Hello, I created the numberAddition Swing application from the NetBean tutorial with no problems. I am able to run the application inside NetBean 6.9.1 using "run --> run file" and it works. When I try doubleclicking on the jar file or use the command line option: "java -jar "D:\WORKINGDIR\NumberAddition\dist\NumberAddition.jar" nothing happens, no errors, or any messages are returned indicating anything is ...

6. Double Click anyone?    coderanch.com

7. MAC OS and Double-Click    coderanch.com

Here's the thing. I've got an application that runs on WinXX platforms, but crashes on MAC OS. I'm running 1.1.8 (MRJ). Other things work find. The crash occurs when the user double clicks a button. The system freezes and you have to do a Force Quit to get out. I've tried the following: Adding a mouse listener and doing a click ...

8. Double click event.    coderanch.com

Hi, I m trying to write a code which creates a ToggleButton which has a MouseClickEvent. I want both single click & double click event on the button.I can get clicks using click count. But whenever i double click on the button, it first calls the single click event for the first click & then the single click, which results in ...

9. Single-Double Click    coderanch.com





11. trapping double clicks using getClickCount of MouseEvent    coderanch.com

easy to get around. Use a Date lastClick; variable. Check lastClick.getTime() in the mouseClicked method (or mousePressed). If it is within a certain number of milisecs of the current time, its a double click and you kick off your event. If it is out of the time range you specify it sets the lastClick to the current time and exits waiting ...

12. How do I implement mouse double-click? - Urgent please..    coderanch.com

Bala The usual way for recognizing double click is with a time interval delay between the single clicks. So when u hit the first click, the time if registered. Now when u hit the second click u register the time again and compare it with the previous time. If the time difference is within an acceptable range defined, then it can ...

13. how a double-click is been recognized?    coderanch.com

14. DEFAULTCELLEDITOR without double click action    coderanch.com

Hi... By the way, we usually active a cell using double click over the cell to be edit. This is my code for instance my own cell editor: CELL_EDIT = new myTableEditor(); TABLE.setDefaultEditor(Object.class, CELL_EDIT);. It is working fine, when I double click over a cell, it start to editing mode. However I would like to active the cell editing without double ...

15. TreeCellEditor on specific nodes and double click?    coderanch.com

Hi, I have a JTree which displays the names of natural languages (dutch, english, french) grouped by their families (romanic, germanic). When a language is selected, a page with info on it is opened in another pane, which, among other things, allows the user to alter its name. The families have no such page, so I need their nodes to be ...

16. System Tray - double click icon to set visible    coderanch.com

I have this code working just fine, one option I want is to use a double-click on the icon in the system tray to set the application visible again. I am thinking of using a mouse listener but not sure where I would put it or would I use a window listener? Thanks for your guidance. Mike import javax.swing.*; import java.awt.*; ...





17. SWT: how do differ between single and double click?    coderanch.com

hello i have a problem with the mouse selection in a tree. i can add a single and double click listener to the three with no problem. the problem i have is that when i double click an item it runs through both listener. Through the mouse down listener twice (first event with one click, second event with count = 2) ...

18. Executing a jar double-click style in Linux    java-forums.org

here a way i tried(worked in Fedora 6): Step 1 : Right Click the jar file choose Properties->Open with->click Add->use a custom command->browse (now searc for the dir containing jre(Java Runtime Enviornment) folder ). on my machine its in 'usr -> local -> jdk1.6.0_07 -> jre-'(Wherever jre folder is located) open the lib folder (in jre only) add choose 'jexec' and ...

19. running jar file by double click    java-forums.org

// hi.java import javax.swing.JOptionPane; class hi{ public static void main(String args[]){ JOptionPane.showMessageDialog(null,"hi"); } } /* step 1: javac hi.java step 2: jar cfe hi.jar hi hi.class step 3: Run it by "java -jar hi.jar". Its running step 4: If I'm running it by double click error occurs. ERROR: Could not find the main class. program will exit. */

20. double click works not in every screen resolution    java-forums.org

Hi, I came to a strange issue. I hope someone can help me out. My swing application needs to act on some double mouse clicks. On my computer it works just fine. However, when installing the application on other computers, it happens that the double mouseclick does not always work. It seems that it depends on the screen resolution and/or screen ...