Dear visitor, welcome to KDE-Forum.org.
If this is your first visit here, please read the Help. It explains in detail how this page works.
To use all features of this page, you should consider registering.
Please use the registration form, to register here or read more information about the registration process.
If you are already registered, please login here.
How can I make Java JFrame "Always on Top" in KDE
Hi!
I am developing an application using java.
I want my application JFrame (Java swing JFrame) to be "always on top", similar to the other applications in KDE.
Also in yahoo messenger ,if we see we can make it "always on top", i want a similar type of feature for my JFrame in java.
I could do this in windows using the win32 api and JNI, can anyone tell me how can I make my application JFrame "always on top" using KDE in linux.
Thanks in advance.
-philomina.
Hmm, it could be possible to do it the KDE's java bindings or, KDE independent, setting the appropriate window managr flags via JNI and, I guess, xlib's API
Cheers,
_
Qt/KDE Developer
Debian User
Thanks anda_skoa , for ur spontatenous reply.
Actually i am new to linux and KDE ,so can u help me out with the task.
Can u tell me precisely what steps are to be followed and what would be the required code.
I found out some methods in kwin,the default window manager ,for KDE to set the state for the windows.
But can u tell me how can I find out which window manager i am using/or how to set the appropriate window manager flags using JNI and KDE's java bindings.
thanks.
-philomina.
The falgs should be pretty window manager independend, as long as the window manager is NETWM compliant.
So it should be possible to use plain XLib for that.
Using the KWin class is just as convenient method for KDE programmers, no dure if it is available in the Java bindings.
The java bindings look to the Java application like normal Java packages, so no need ofr JNI in that case.
I don't know JNI very deeply so I can only guess you can call XLib API like Windows C API
You would need to check the relevant code how to do the X API calls in the sources of some library that can do it (KDE, Qt, GTK)
Cheers,
_
P.S: perhaps some one on the kde-java mailinglist has better ideas. The kde-java bindings maintainer Richard Dale is subscribed there as well IIRC
Qt/KDE Developer
Debian User