Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / April 2005

Tip: Looking for answers? Try searching our database.

TopMost Windows

Thread view: 
Linda - 11 Apr 2005 17:49 GMT
Is there a way, in Java, to create windows with the WS_EX_TOPMOST property
set in Windows?

I set the property after creation using JNI, but that appears to be too
late.

-Linda
John McGrath - 11 Apr 2005 18:19 GMT
> Is there a way, in Java, to create windows with the WS_EX_TOPMOST
> property set in Windows?
>
> I set the property after creation using JNI, but that appears to be too
> late.

I am not familiar with the Windows API you refer to, but I suspect that
might be the same as setting the AlwaysOnTop property for a Window.  This
property is new in JDK 1.5.

Signature

Regards,

John McGrath

Linda - 11 Apr 2005 21:50 GMT
"John McGrath" <ng@jpmcgrath.net> wrote in news:xn0e0vj352mywb0003
@news.verizon.net:

>> Is there a way, in Java, to create windows with the WS_EX_TOPMOST
>> property set in Windows?
[quoted text clipped - 5 lines]
> might be the same as setting the AlwaysOnTop property for a Window.  This
> property is new in JDK 1.5.

Unfortunately I've been told that my company won't be using 1.5 for quite
some time due to incompatibilities with a 3rd party library we're depending
on.

Is there another way?

Thanks,

-Linda
John McGrath - 12 Apr 2005 02:48 GMT
> Unfortunately I've been told that my company won't be using 1.5 for
> quite some time due to incompatibilities with a 3rd party library we're
> depending on.
>
> Is there another way?

Well, the next thing I would have mentioned is JNI, although you say you
tried that.  However, I doubt that the problem you had is because you set
the property too late.  It looks to me as if the property can be changed
anytime.

I have a tool that allows me to set this property on arbitrary windows,
and it works anytime.  I also just created a test program using JDK 1.5.
It contains a checkbox that allows me to toggle the AlwaysOnTop property
for the frame, and it also works anytime.

BTW - I verified that in both these cases, the WS_EX_TOPMOST Windows style
is being set.

Signature

Regards,

John McGrath



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.