943,671 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 40293
  • Java RSS
Aug 3rd, 2005
0

Making a Java Image Enlarger

Expand Post »
Hi Everybody,

Is there a way to have a picture of the 3 or 4 sq. pixels you're mouse is hovering over appear in the bottom of the screen?
Thanx.
Last edited by C++; Aug 3rd, 2005 at 3:01 am. Reason: Wrong Question
Similar Threads
Reputation Points: 12
Solved Threads: 2
Posting Whiz
Ghost is offline Offline
352 posts
since Aug 2004
Aug 3rd, 2005
0

Re: Making a Java Key Logger

I don't think you can do that in Java. You can do it in C++ easy enough by installing an OS hook. Used generally by macro programs and spyware.

But I don't think Java has this kind of access to WIN32. Maybe through JNI?

Jeff Heaton
http://www.heatonresearch.com
Reputation Points: 12
Solved Threads: 0
Junior Poster in Training
JeffHeaton is offline Offline
58 posts
since Jul 2005
Aug 3rd, 2005
0

Re: Making a Java Key Logger

You can get the mouse coordinates of the mouse.
That will give you the location on screen.
From that you could get the Component the mouse is over.
From that you can retrieve a Graphics object which can draw that component.
From that you can retrieve an offset Graphics object which can draw that component somewhere else (if I read the API docs correctly).

What I don't know is whether any of that will do you much good
Team Colleague
Reputation Points: 1658
Solved Threads: 331
duckman
jwenting is offline Offline
7,719 posts
since Nov 2004
Aug 30th, 2009
0

Re: Making a Java Key Logger

if a java keylogger is unavailable therefore the ability to simply count the number of keystrokes must be the same.

does anybody know of a simple keylogger that counts the number of mouseevents and keystrokes? or failing this one that outputs to a text file which can then be read later on?
Reputation Points: 10
Solved Threads: 0
Newbie Poster
sl1pstr3am is offline Offline
2 posts
since Aug 2009
Aug 30th, 2009
0

Re: Making a Java Key Logger

you could try to write one yourself.
a bit like:
[Code=Java]
if ( mousePressed() ){
while(mousePressed() ){}
System.out.println("mouse is pressed");
}
[Code]
logic

also, for a next time, there's no need to revive threads that have been inactive for over 4 years, you are allowed to create your own.
Reputation Points: 919
Solved Threads: 354
Nearly a Posting Maven
stultuske is offline Offline
2,487 posts
since Jan 2007
Aug 30th, 2009
0

Re: Making a Java Key Logger

thanks luke, ill keep that in mind...just wondering if it will work like the c++ logger mentioned abov ...ie at operating system level its a fairly important feature, but with file output would be easy to a: buffer the keystrokes and can then process in the background, and b: save embedding c code in a pre written java program.

ill look in the forums n see if theres a nire recnt thread...thanks again, and for the advice to a noob.

Pete
Reputation Points: 10
Solved Threads: 0
Newbie Poster
sl1pstr3am is offline Offline
2 posts
since Aug 2009
Jul 29th, 2010
0
Re: Making a Java Key Logger
have any code project that i can download or read ???
Reputation Points: 10
Solved Threads: 0
Newbie Poster
volvo14 is offline Offline
1 posts
since Jul 2010

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: Loops and Sentinels
Next Thread in Java Forum Timeline: CLASSPATH





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC