Results 1 to 2 of 2
- 04-02-2012, 07:37 PM #1Member
- Join Date
- Apr 2012
- Rep Power
- 04-02-2012, 09:06 PM #2
Re: knowing color of a pixel in a window
I'm not sure if this is what you are looking for, but for any object that extends Component, you can call getColorModel(), which returns the instance of ColorModel used to display the component.
With the ColorModel, you can then call getRGB(int pixel), passing in the pixel you are interested in, and it will return the color components of the pixel in the default RGB color model format.
Last edited by sehudson; 04-02-2012 at 09:09 PM.
- By lostsoul28 in forum New To JavaReplies: 1Last Post: 02-01-2012, 01:50 PM
- By santafan in forum Java 2DReplies: 4Last Post: 11-08-2011, 05:04 AM
- By santafan in forum Java 2DReplies: 1Last Post: 11-08-2011, 05:04 AM
- By TyCox94 in forum JDBCReplies: 8Last Post: 09-23-2011, 04:20 AM
- By liluma in forum New To JavaReplies: 7Last Post: 09-06-2011, 07:53 PM