shh.util
Class SavePrintTools
Object
SavePrintTools
- public class SavePrintTools
- extends Object
Static methods for saving and printing.
|
Field Summary |
static File |
LAST_DIR_USED
The last directory used by a file chooser in this class;
defaults to the user's current working directory. |
| Methods inherited from class Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LAST_DIR_USED
public static File LAST_DIR_USED
- The last directory used by a file chooser in this class;
defaults to the user's current working directory.
SavePrintTools
public SavePrintTools()
saveComponent
public static void saveComponent(JComponent comptToSave,
Component dialogParent,
String suggestedFilename)
- Saves a JComponent's image to a file in a format like png or
jpg. The component should be showing on screen.
- Parameters:
comptToSave - The JComponent to save.dialogParent - The parent for the dialog boxes.suggestedFilename - An initial default like
myfile. The method will convert this to
myfile.png, myfile.jpg, etc.