How do I capture a screendump of a Swing-based GUI?

John Zukowski

As long as you don't need the window manager adornments, you can use the RepaintManager to capture the image on any Swing component:

RepaintManager manager = RepaintManager.currentManager(component);
Image htmlImage = manager.getOffscreenBuffer(component, compWidth, compHeight); 
0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact