This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
In my project one JInternalFrame of size 600 X 600 is there, I have a network topology (Ring) on that, It has zoom in and zoom out fecility, if i save the same dialog box the topology which is there on that, that much only i could have save as an image. So i am taking the panal of that InternalFrame and adding to JDialog. and saving this dialog box which is of size 8000 X 8000 by using ImageIO.
to save this dialog box it is taking more than 15 mins.
How can i decrease the saving time,
My project main frame is freezing while saving this dialog box, How could i stop freezing.
And i want to show a progress bar while saving the image, but this progress bar is getting visible after saving the image, and unfortunately this progress bar is adding the my saving image.
Can anybody help me in this regard.
Thanks in adwans.
Joined: Jun 12, 2007
Hi all the code i am using is
/** * Create a BufferedImage for given component. * Opens a Save dialog box, takes the location to save. * All or part of the component can be captured to an image. *@param component Swing component to create image from * */
If it's really an 8000x8000 image, that's on the order of 200MB of raw data before PNG compression. Could it be that this has nothing to do with your dialog or Swing and that writing almost any 8000x8000 PNG would take that long?
things that I wonder:
A) What kind of screen do you have that can display a 8000x8000 pixel dialog box?
B) Does it really make sense to store a dialog box as an image?