We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › window allways on top
Page Index Toggle Pages: 1
window allways on top (Read 1090 times)
window allways on top
Jun 9th, 2007, 10:33pm
 
Hello,
Is there any way to keep an applet generated using processing always on top of all other windows?  The program runs on the users machine locally, not as part of a webpage.

...Or if that's not possible, is there some function that can be called periodically to bring the program to the top?  (I could call this every few seconds, for example)

Thanks,
Tom
Re: window allways on top
Reply #1 - Jul 7th, 2007, 9:49pm
 
Hi tom,

try to type this in setup..

Code:

frame.setAlwaysOnTop(true);



.. for more frame functions:

http://java.sun.com/j2se/1.4.2/docs/api/java/awt/Frame.html

I am not sure if all of them will work in processing.. more correctly, I am sure that some of them will not.

regards, Kof.
Re: window allways on top
Reply #2 - Jul 8th, 2007, 2:42pm
 
Code:
frame.setAlwaysonTop(true) 


works (I used it) but I think it a Java 1.5 function...
Re: window allways on top
Reply #3 - Jul 8th, 2007, 6:07pm
 
Yes, you're right. It's a java 1.5 function. My fault, I don't use processing with it's own java {think 1.4.2 (?)}, I just did not realize that.

...

BtW, some of the frame functions works well outside of processing, I mean for example eclipse+processingCore the function:

Code:
frame.setUndecorated(true); 


.. gives nice looking frame without a classic border {win}, but from whitin processing I can't get this work.

.. Right, this is just an aesthetic detail, rather than essential function. And I can also imagine what a headache is all around java-frame's implementation to processing.

regards, kof
Re: window allways on top
Reply #4 - Jul 13th, 2007, 12:49am
 
I'm really sorry for double-posting,

just mentioned that, function "frame.setUndecorated(true);" working well, but you have to tell (of course) what is the frame you want to undecorate.. "this.frame.setUndecorated(true);"..

Hmm, my banal mistake.

FIN
Page Index Toggle Pages: 1