This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How can i find the color of the pixel  RSS feed

 
Pooja Roshan
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have to find the color of the pixel in the mouse_move event, (color of the pixel of the current mouse position) Plz give me all the posible solutions,
Advance thankx.
Pooja.
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pooja,
All the MouseEvent gives you is the x and y location of the place where the event happened. To get the color of the pixel that this event happened on, you would have to have a component that keeps track of ( or can find ) the color of a certain x,y location on itself. None of the components provided with Java do this ( Well, I don't think any of them do... correct me if I am wrong... ), so you would probably have to write your own component to do this.
HTH,
-Nate
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!