• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Capture Screen in java

 
Kamal Hassan
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I have an applet that runs a report of around 100 pages. Infact, Well, I provide the applet for another application that generates the report! Note that its the aplication that is providing the report and is not by the applet, however the report can be seen on the applet window! The application pushes the report on to the screen and I'll have to provide a functionality to capture everything that is shown on the screen! The report is pumped on the screen rapidly in less than 2 minutes. I want to capture the whole screen data and then save it as a text file! With the word "data" I mean just the data on the screen and not any of the menus or toolbars! The application does not push it to the file due to some security reasons. And, I totally understand that a snapshot pertains to one particular instance of the screen and not more than one screen. However, I'm interested in capturing the whole data. As the report is generated continously, we can capture one screen at a time, keep it to a buffer, and keep adding to buffer, without missing or repeating the data, and finally have the entire report in the buffer and then save it to a file! Though I have an conceptual idea, I'm sure as to how to implement it...I use jdk1.42! Once I get the report in the text format, saving it wil be of no problem, however I need suggestions as to how to go about this! Any code samples is appreciated! Mail me at [email address removed], if you have any suggestions and the one which completely resolves my issue will be rewarded!
And.. Mailing me was just an option, I will always look up the forum for any answers..

Regards,

Kamal
[ July 13, 2006: Message edited by: Ulf Dittmer ]
 
Lanny Gilbert
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just a quick thought.. Does the report *have* to display on the screen as it is being run???

One thing you could do is to have a StringBuffer and just keep appending the report data to that. then, when you have the full report, pop up a JFrame containing the text. From there users can copy and paste from the window to wherever they want.

Or, you could put the text from the StringBuffer in a JTextArea that users can scroll thru on your applet screen. Maybe put up an hourglass and a status message on the browser status line saying "Processing Report..." and maybe and an extra dot each time you get a page of the report.

Just some thoughts....
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Kamal-

Welcome to JavaRanch. We like to keep discussions in these forums, so I removed the email address from your post.

Enjoy your time here.

Ulf
Applet Forum Bartender
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic