• Post Reply Bookmark Topic Watch Topic
  • New Topic

Probelms running Swing application using Java 1.6 and Windows-based X Server  RSS feed

 
Mark E Hansen
Ranch Hand
Posts: 650
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
At our company we run a third-party Java-based GUI application on one of our Linux server machine, displaying the application to our local Windows work stations using the Cygwin X Server.

We noticed a few problems with a new version of this application and was able to narrow it down to the following conditions:
1. Java Swing application running on a UNIX host;
2. Java used is 1.6 (problem not noticed when using Java 1.5)
3. Displaying to Cygwin X server (I've heard other windows-based X servers have the same issue, but I don't have access to any others at this time).

If we run the application natively on Windows, we don't have any problems.
I'm told if the application runs on the Linux host and displays natively to that machine's display there are no problems (although I'm not able to verify this myself).

The problems are:

1. Any new frame/dialog is opened in the geographic center of the dual displays, rather than in the middle of one or the other;
2. Any attempt to drag the window to a different location on the display seems to work, but as soon as you let go of the drag, the window snaps back to the original location. This only happens the first time you try to move each window.
3. Drop-down controls (JComboBox, for example) just close back up as soon as you click on them. If you click and drag the mouse to attempt to make a selection, no selection can be made.

Are these known problems using 1.6 on UNIX displaying to Windows-based X Servers?

The only real problem is number 3. I expect that if I put more work into the window placement, I should be able to get past number 1. Number 2 is just a minor annoyance.

Any ideas how to get around this?

The following is a simple Java Swing application which when run in the correct environment will exhibit the problems.

 
Hauke Ingmar Schmidt
Rancher
Posts: 436
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know about this specific problem, but other than rethinking the architecture (at least a remote desktop session could be possible?) you could try to switch off hardware acceleration/OpenGL: http://download.oracle.com/javase/1.5.0/docs/guide/2d/flags.html
 
Mark E Hansen
Ranch Hand
Posts: 650
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks. I tried that (and all the flags documented on that page) and nothing helped.
I tried turning on the logging, but it just says things like drawing lines, filling polygons, etc. Nothing to indicate why the drop down control won't work (or the other problems).

Any other ideas?
 
shanmuga sun
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

You got the solution for this issue?
 
Campbell Ritchie
Sheriff
Posts: 53774
128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch
After three years, the OP might not be around to answer that question.
 
Mark E Hansen
Ranch Hand
Posts: 650
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, it's been so long I don't remember for sure. I do know that we had problems with Swing application running on a Linux host
and displaying to a Windows X Server that were resolved by forcing the Motif look and feel. Good luck.
 
Campbell Ritchie
Sheriff
Posts: 53774
128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for coming back to answer.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!