开发者

Difference in viewing a swing application via a remote client and viewing directly

开发者 https://www.devze.com 2023-03-24 06:16 出处:网络
So I have an executable jar file which when run in windows or in Linux by using the command `java -jar filename.jar`

So I have an executable jar file which when run in windows or in Linux by using the command

 `java -jar filename.jar`

the output is this. But when the same thing is viewed via a remote connection using VNC client, the output is reduced to this

I have tried changing the resolution of the vncserver instance by using -geometry attribute and have also tried supplyin开发者_运维知识库g values for "-cc" and the "-depth" attributes. But to no avail. Can someone tell me what I have to do so as to get the intended display properly in the vnc session as well?


This may be seen when the GUI is not constructed on the event dispatch thread. The remote connection adds enough latency to expose the underlying problem.

Because the two images have differing dialog names, verify that both represent the same code. Also, check the remote server's .vnc log to see what window manager is being used.

Addendum: I'm not sure what VNC server your server is using, but you may be able to edit $HOME/.vnc/xstartup to specify the window manager. Gnome's Metacity has worked for me.


VNC Clients also have settings, like color depth etc, that effect the output quality. And it also depends on capabilities of VNC. Which SErver and and which client are you using? If you have set in in the VNCSErver, check the params of VNCViewer.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号