You are not logged in.

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.

1

Wednesday, July 16th 2003, 1:00pm

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.

anda_skoa

Professional

Posts: 1,273

Location: Graz, Austria

Occupation: Software Developer

  • Send private message

2

Wednesday, July 16th 2003, 5:02pm

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

3

Thursday, July 17th 2003, 9:32am

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.

anda_skoa

Professional

Posts: 1,273

Location: Graz, Austria

Occupation: Software Developer

  • Send private message

4

Thursday, July 17th 2003, 1:30pm

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