Is it possible in Java to draw shapes and stuff directly on the screen so my desktop remains visible and I can click whatever is underneath my shape? I’m using Windows XP. Thanks.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes, that is possible. But it’s not a trivial task.
If you are looking for “desktop widgets”:
See this and this link* for translucent & shaped windows
See this link for more experimental GUI information.
You are probably going to need JNA or JNI to create these windows/effects, but also to provide “click-through” functionality.
*Java 6u10 required. You can basically draw anything you want inside a Frame, set the properties mentioned in the thread linked and anywhere you didn’t draw (or drew transparent pixels) the desktop will be visible.
(I’d consider using a language/framework different from Java, as desktop-widgets are not really easy to implement in Java [maybe even JavaFX?])