Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > applet frame

Reply
Thread Tools

applet frame

 
 
Matthijs Blaas
Guest
Posts: n/a
 
      11-29-2004
Hi All,

Im expiriencing weird behaviour with JRE1.5 and a applet frame I'm using. On
Jre's <1.5 it works ok, but with the JRE1.5 the applet window will lose
focus imediatly after it pops up... I've put a little example online at:
http://www.virtual-boy.org/applet/frame.html

Source files:
http://www.virtual-boy.org/applet/Test.java (this class it's about, it
instanciates the frame and requests its focus)
http://www.virtual-boy.org/applet/Frm.java (the frame's class)


 
Reply With Quote
 
 
 
 
Andrew Thompson
Guest
Posts: n/a
 
      11-29-2004
On Mon, 29 Nov 2004 01:46:15 +0100, Matthijs Blaasthijs_blaas wrote:

> Im expiriencing weird behaviour with JRE1.5 and a applet frame I'm using. On
> Jre's <1.5 it works ok, but with the JRE1.5 the applet window will lose
> focus imediatly after it pops up...


I have less experience with frames launched from applets, but I
*suspect* that it is foolhardy to depend on *any* 'default' behaviour.
<http://groups.google.com/groups?threadm=y5EKb.80685$>

You might try using setAlwaysOnTop (1.5+), or starting a thread
that brings the Frame to front every nn milliseconds.

BTW. A better group for such matters is..
<http://www.physci.org/codes/javafaq.jsp#cljg>

HTH

--
Andrew Thompson
http://www.PhySci.org/codes/ Web & IT Help
http://www.PhySci.org/ Open-source software suite
http://www.1point1C.org/ Science & Technology
http://www.LensEscapes.com/ Images that escape the mundane
 
Reply With Quote
 
 
 
 
Matthijs Blaas
Guest
Posts: n/a
 
      11-29-2004
> You might try using setAlwaysOnTop (1.5+), or starting a thread
> that brings the Frame to front every nn milliseconds.


While searching for more info about that method I found another one:
toFront()
I just call toFront() when the window listner receives a windowDeactivated
event. A nice side-effect is that if you click next to the frame it will
still stay on top.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
struts/jsp/applet: sessionid doesn't work in applet for macs only Blah Blah Java 0 08-13-2003 02:51 AM
Cool Applet Cool Applet http://24.60.235.213/Grid/ Alisher Fatykhov Java 1 08-06-2003 04:32 AM
Re: newbie: Join JApplet & Applet in one applet Andrew Thompson Java 0 08-05-2003 01:41 PM
Re: play wave files using java.applet.Applet webster Java 0 07-20-2003 01:51 PM
applet vs. canvas in applet Rob Love Java 1 07-07-2003 10:07 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57