Running Java application with drag and drop support in cygwin
Tue Nov 3 09:08:00 GMT 2009
Jon/others in list,
Any updates? Let me know if you are stuck somewhere.
On Fri, Oct 30, 2009 at 2:36 PM, Dees <email@example.com> wrote:
> Your reply is much appreciated Jon. I will try to be more specific
> about the problem in further mails.
> On Thu, Oct 29, 2009 at 8:11 PM, Jon TURNEY <firstname.lastname@example.org> wrote:
>> On 28/10/2009 05:57, Dees wrote:
>>> I have developed a Java application involving jTree with extensive
>>> drag and drop support, which runs correctly in my Linux box. However,
>>> when I switch to a windows box and access the same Linux box using
>>> cygwin x-server, the drag and drop in jTree stops working.
>>> Interestingly, rest of the application still works fine. After
>>> analyzing a bit I found that x-server is able to recognize the drag
>>> event but fails to recognize a drop event.
> OS : Suse Linux Enterprise Server 10 (i586)
> Version : 10
> Patch level : 3
> Other version information:
> Java : JDK 5
> Cygwin setup-version: 2.573.2.3
> Also tried using Xming 184.108.40.206 ssh same Linux setup from Windows, but
> that also doesn't solve the problem.
>>> Is there any setting, which should be done prior to running the Java
>>> swing applications?
>>> Here is a sample code which behaves in exactly same way.
>> I have no idea how to use that java code to reproduce the problem you are
> Using the above java code in Linux:
> 1. Download and Install Java Development Toolkit on your Linux box
> (Java sun download site:
> http://java.sun.com/javase/downloads/index.jsp), if you do not have it
> 2. Save the sample code in the above link with the file name
> TreeTester.java, say in /home/user/
> 3. Navigate to TreeTester.java from shell, and compile the java code:
> # cd /home/user/
> # /usr/java/jdk1.5.0_14/bin/javac TreeTester.java
> Ignore any warnings of deprecated APIs.
> 4. This will create a few .class files in /home/user/ directory. Final
> step is to run the Java code, using:
> # /usr/java/jdk1.5.0_14/bin/java -classpath . TreeTester
> This will open up a GUI, with a jTree each on left and right pane.
> You can drag and drop any of the leaf nodes from one jTree to the root
> node of the other jTree and this should add a new node in the other
> jTree. You will get messages on console for the operations being
> performed. Now ssh the same box using cygwin/xming from any other
> windows box, and run the application using command in step 4. You
> should be able to drag (a small icon will come under cursor indicating
> that something is being dragged) but when you will drop it, the new
> node would not be added to the tree. Thats where lies my problem!!!
>>> May be my problem is related to some setting. Though, not sure.
>>> Has anybody come across something similar? What should be done then?
>>> Please let me know.
>> No it's probably a bug in Cygwin/X. But you're going to need to be a lot
>> more specific about the problem before any progress can be made on fixing
> I have been using Netbeans IDE for compiling and running java code,
> which creates an executable jar. For your convenience, I am attaching
> the same with this mail. You can observe the current behavior by
> running directly this file without the need to compile the source code
> (as specified above), using:
> # /usr/java/jdk1.5.0_14/bin/java -jar TreeTester.jar
> Also, putting some debug messages in the code lets me conclude that
> it's the drop event which is not being recognized, as the main control
> never reaches there.
> Let me know if you need any other specific details or come across any
> other issue.
>> Jon TURNEY
>> Volunteer Cygwin/X X Server maintainer
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
More information about the Cygwin-xfree