0

Please suggest the way to take screenshot of URL/HTMLFile in java. I am trying with LOBO Browser and able to Open URL in jframe but not able to take screenshot of content inside jframe. Please check code sample

import org.lobobrowser.gui.FramePanel;

public LoboTestFrame() throws Exception {
    FramePanel framePanel = new FramePanel();

    this.getContentPane().add(framePanel);
    framePanel.navigate("http://en.wikipedia.org/wiki/Main_Page");

}

Not able to capture loaded content as image

apiGcal
  • 1
  • 1

1 Answers1

2

Yes. Combine Desktop#browse(), mentioned here, with Robot#createScreenCapture(), illustrated here and here.

Community
  • 1
  • 1
trashgod
  • 203,806
  • 29
  • 246
  • 1,045
  • hi thnx for your response but i cannot capture screen.I need to get image of content loaded through Lobo browser or any other good html render api. these example not loading complex html pages properly – apiGcal Nov 18 '14 at 05:19
  • i dont want Jframe visibility ..just want to save the loaded url as image – apiGcal Nov 18 '14 at 08:42
  • `Desktop#browse()` is the easiest way to get a correctly rendered page; more on headless operation [here](http://stackoverflow.com/a/13985919/230513). – trashgod Nov 18 '14 at 14:03