Painting to screen

Reply

Join Date: May 2008
Posts: 1,018
Reputation: Paul Thompson has a spectacular aura about Paul Thompson has a spectacular aura about Paul Thompson has a spectacular aura about 
Solved Threads: 167
Paul Thompson's Avatar
Paul Thompson Paul Thompson is offline Offline
Veteran Poster

Painting to screen

 
0
  #1
Oct 17th, 2009
Hi,
I have been trying to get a java program that draws a line directly on the screen. I have made ones that draw on JApplets and JFrame's but i cant work out how i can draw directly on the screen without having something in the way.

I looked at using Java canvasses but couldn't see a way i would do it with those so im a bit flummoxed.

Is there a way to do this in java?
Make it idiot-proof, and someone will just make a better idiot
Check out my Site | and join us on IRC | Python Specific IRC
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 212
Reputation: llemes4011 is an unknown quantity at this point 
Solved Threads: 13
llemes4011 llemes4011 is offline Offline
Posting Whiz in Training
 
0
  #2
Oct 17th, 2009
If it can be done using the Win32 C++ API (On Windows), then you might be able to accomplish this using JNI (Java Native Interface), but all of the documentation is very old. I believe you can "fake" it by making the JFrame Translucent, and just drawing on it when it's like that. Here's some info about making frames translucent. Translucent Frames

Hope this helps =)
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 1,018
Reputation: Paul Thompson has a spectacular aura about Paul Thompson has a spectacular aura about Paul Thompson has a spectacular aura about 
Solved Threads: 167
Paul Thompson's Avatar
Paul Thompson Paul Thompson is offline Offline
Veteran Poster
 
0
  #3
Oct 17th, 2009
yeah, the only problem with having transparent frames is that i would like the user to be able to click the things on the other side of the frame, so that it is not "taking up" the focus.

If that makes sense
Make it idiot-proof, and someone will just make a better idiot
Check out my Site | and join us on IRC | Python Specific IRC
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 212
Reputation: llemes4011 is an unknown quantity at this point 
Solved Threads: 13
llemes4011 llemes4011 is offline Offline
Posting Whiz in Training
 
0
  #4
Oct 17th, 2009
hmm, I don't know if making the frame un-focusable after making it transparent would allow you to click through it or not....
I'm sorry I couldn't be more help, maybe someone else knows.
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 1,018
Reputation: Paul Thompson has a spectacular aura about Paul Thompson has a spectacular aura about Paul Thompson has a spectacular aura about 
Solved Threads: 167
Paul Thompson's Avatar
Paul Thompson Paul Thompson is offline Offline
Veteran Poster
 
0
  #5
Oct 18th, 2009
No worries, thanks for trying. If anyone has any other ideas i would love to know. I know you can do this in python, i thought java would have the same functionality.
Make it idiot-proof, and someone will just make a better idiot
Check out my Site | and join us on IRC | Python Specific IRC
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Java Forum


Views: 328 | Replies: 4
Thread Tools Search this Thread



Tag cloud for Java
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2010 DaniWeb® LLC