Article View: borland.public.jbuilder.java.swing
Article #11092Re: How to keep a JWindow on top?
From: Jean-Baptiste bugeaud
Date: Thu, 15 Jul 1999 00:00
Date: Thu, 15 Jul 1999 00:00
38 lines
1326 bytes
1326 bytes
Steve Cannon <scannon@austin.rr.com> wrote in message
news:7mdpbg$rpe12@forums.borland.com...
> I have a JWindow derived component that I always want to be on top of all
> other windows. I seem to be having some difficulty with this. Can anyone
> tell me how?
>
>
just try :
final JWindow window=this; // ;)
new Thread(){
public void run (){
while(true){
window.toFront();
try{
Thread.sleep(150);
}catch(Exception ex){
}
}
}
}.start();
in your code !
This will force the window to stay on front, by may also grab the focus :(
There is no "always on top" feature in AWT, only in Swings JDesktopPane :)
(cf Layers)
Have fun with JBuilder3
---
Jean-Baptiste Bugeaud
JBuilder Trainer - Probase
bjb@probase.fr_nospam_
Technical Details
Message-ID:
<7mlama$5rc18@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<7mdpbg$rpe12@forums.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,904bd3c9587c0d7d X-Google-Attributes: gid111d45,public From: "Jean-Baptiste bugeaud" <bjb_nospam_@probase.fr> Subject: Re: How to keep a JWindow on top? Date: 1999/07/15 Message-ID: <7mlama$5rc18@forums.borland.com> X-Deja-AN: 501431913 References: <7mdpbg$rpe12@forums.borland.com> X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Organization: PROBASE X-MSMail-Priority: Normal Newsgroups: borland.public.jbuilder.java.swing