开发者

How do i get pixel data of an AWT component?

I have a JLabel component to which i write some text. I want to decode it to pixe开发者_运维问答l array and send it via RS-232 interface to some external appliance.

How can i access pixels of Component or Graphics objects?


Using Robot is one way. Here is another way.

Robot is fine for most needs, better for some, but the advantage of the second way is that it can be done even in a sand-boxed app.


Use Robot class. Here's an example how to create a screenshot with it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜