File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes 2Dgraphics object Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "2Dgraphics object" Watch "2Dgraphics object" New topic

2Dgraphics object

Ken Ng

Joined: Feb 14, 2004
Posts: 26
hi all,
I have created a graphic object using the drawPolygon().
The object is drawn on a frame.
Is it possible to save that 2D graphic object in some image file format
so that when i open the file, that image will appear in the frame.
Something similar to a workspace for u to load your document in it.

AWT newbie need help!
Craig Wood
Ranch Hand

Joined: Jan 14, 2004
Posts: 1535
If you check the JFileChooser page in the java tutorial you will find some fancy bells and whistles to add to your file chooser. This one is the stripped down model.
It is sorta covered in the JavaRanch Style Guide.
subject: 2Dgraphics object
Similar Threads
Adding an image to a frame
how to use image ?
several animation frames in one file, transparency issues
Boardgame to interactive GUI -- need help
whats wrong with Jimi