to create X window(X11) in java swing and to get its id

前端 未结 5 1565
孤街浪徒
孤街浪徒 2020-12-17 05:42

Can anyone help me in creating an X11 window in java swing using eclipse?And also the function to get the x11 id also.What are the basic requirement for creating an X11 wind

5条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-17 05:52

    If you're using a Sun JVM and don't mind overriding package access using reflection and "setAccessible(true)", then you can create an X11 window using the Sun's toolkit. https://www.docjar.com/docs/api/sun/awt/X11/XWindow.html

    Not all methods of the toolkit might be present, though: I suspect methods not used in the toolkit itself were removed. For example, most of the XlibUtil aren't there. Here's an example how to use reflection to access the toolkit methods, in Scala: http://gist.github.com/567076

    You can also use JNA to code xlib parts in Java; see question: Using Xlib via JNA to move a window

提交回复
热议问题