Question

I have a JLabel component to which i write some text. I want to decode it to pixel array and send it via RS-232 interface to some external appliance.

How can i access pixels of Component or Graphics objects?

Was it helpful?

Solution

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.

OTHER TIPS

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top