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 & HelpPrograms › Forcing a window to stay in front of all others
Page Index Toggle Pages: 1
Forcing a window to stay in front of all others (Read 1628 times)
Forcing a window to stay in front of all others
Dec 8th, 2008, 11:42am
 
Hi there,

This is my first post and yes I'm a total newbie to processing.

Is there a way I can keep my java window in front of everything in the OS while it's running?

Also, is there a way I can hide the OS window frame (minimize/maximize/restore controls ect...) for the program while it's running?

I had a look under Environment in the reference but could not find anything along those lines.

Any ideas or suggestion would be most appreciated.

Thanks in Advance,

Dan.
Re: Forcing a window to stay in front of all other
Reply #1 - Dec 8th, 2008, 12:49pm
 
Second question answered in hiding windows controls.

First question: frame.setAlwaysOnTop(true);
Re: Forcing a window to stay in front of all other
Reply #2 - Dec 9th, 2008, 1:17am
 
Wow thanks for the speed reply! That all works a treat. But now I need a command for positioning the window on my screen. Is there a screen.position command?

Also, where would I look in my local processing install directories to find all the functionality of say, the "frame" command?
Re: Forcing a window to stay in front of all other
Reply #3 - Dec 21st, 2008, 1:02am
 
have been wondering about this myself. Is it for example possible to animate the position of a window, or is that something that windows, mac os x and linux forbid you to do?


everything about the frame class can be found here, but I haven't been able to find a solution yet.

http://java.sun.com/j2se/1.3/docs/api/java/awt/Frame.html
Re: Forcing a window to stay in front of all other
Reply #4 - Dec 27th, 2008, 10:32pm
 
still haven't found a way to animate, make it transparent or give os window round edges (ala steam, vuze and so on).

could it be that those things are only possible using the jframe class?

please mind that i am pretty new to programming
Re: Forcing a window to stay in front of all other
Reply #5 - Dec 28th, 2008, 9:44am
 
I haven't yet seen Java programs with funky window forms. Perhaps it is possible, but it requires some low level system tricks which are not portable.
I believe you can move the window, I think I have seen a post about that in the forum.
Transparency, I don't know how it can be achieved. If you can do it, doing strange shapes is possible: you remove the OS decorations (borders, title...), make some parts transparent, and let mouse clicks go through holes...
I am not sure that Java is the best suited for such things...

A quick search shows that it is possible: Translucent and Shaped Swing Windows. And confirms it needs low level system calls...
Page Index Toggle Pages: 1