Meaningless Drivel is fun!*
The moose likes Swing / AWT / SWT and the fly likes Editable screensaver that is running all the time Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Editable screensaver that is running all the time" Watch "Editable screensaver that is running all the time" New topic
Author

Editable screensaver that is running all the time

john price
Ranch Hand

Joined: Feb 24, 2011
Posts: 495


Basically, this is an overlay of the screen. It is a screensaver, if you will. What happens is when you click on it, it goes away. If you click on the tab in the bottom, it comes back up. You can draw on it by dragging the mouse over the surface. What I want to happen is if you click, it still shows up, but the underlying programs can run. You should be able to click on them and do everything normal. When you drag your mouse again, it should go back to the "screensaver" program. How would I do this? This above code is fully runnable and works fine. I just want to add this final feature. I am just not sure how. Would I use the Robot class or would that just do stuff to the Java program? Or (very crappy solution), if the user clicked, I use the Robot class and if they click on something, it hides the window, clicks, then brings it back up again. This is not what I am looking for, but it is something I've thought of. Same for the typing. How do I get this to work properly?

NOTE: I am NOT looking for it to disappear. I want it always showing, but the OS and other programs able to have full mouse and keyboard support (except for the dragging of course).

Thanks,
cc11rocks aka John Price


“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” (Mosher's Law of Software Engineering)
“If debugging is the process of removing bugs, then programming must be the process of putting them in.” (Edsger Dijkstra)
randy orton
Greenhorn

Joined: May 20, 2011
Posts: 15
john price wrote:
Basically, this is an overlay of the screen. It is a screensaver, if you will. What happens is when you click on it, it goes away. If you click on the tab in the bottom, it comes back up. You can draw on it by dragging the mouse over the surface. What I want to happen is if you click, it still shows up, but the underlying programs can run. You should be able to click on them and do everything normal. When you drag your mouse again, it should go back to the "screensaver" program. How would I do this? This above code is fully runnable and works fine. I just want to add this final feature. I am just not sure how. Would I use the Robot class or would that just do stuff to the Java program? Or (very crappy solution), if the user clicked, I use the Robot class and if they click on something, it hides the window, clicks, then brings it back up again. This is not what I am looking for, but it is something I've thought of. Same for the typing. How do I get this to work properly?

NOTE: I am NOT looking for it to disappear. I want it always showing, but the OS and other programs able to have full mouse and keyboard support (except for the dragging of course).

Thanks,
cc11rocks aka John Price

hello John Prince.......
if(window.isVisible()) window.toBack();
else window.toFront();
just add this in your mouseclicked and this will work for u.......bye have a good time.
john price
Ranch Hand

Joined: Feb 24, 2011
Posts: 495

This just hides the JFrame. I do not want to hide the JFrame.
Thanks,
cc11rocks aka John Price
randy orton
Greenhorn

Joined: May 20, 2011
Posts: 15
john price wrote:This just hides the JFrame. I do not want to hide the JFrame.
Thanks,
cc11rocks aka John Price

Hello john......
add this to your code.
When you click on an application running behind your jframe.Your mouse control simply transfers to that.Yes your
drag will not work(you cannot draw) while dragging on the application.But when you drag outside it you are back again to your jframe.
I must tell you there is no way to get events outside your your java window.
This link might help you.....javadocs
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Editable screensaver that is running all the time
 
Similar Threads
Drawing a selection box using swing
cannot draw graphics
weird and unwanted duplicate component is being painted, moving a component(Simple animation)
inconvertible type error
Moving multiple ojects in Java2D