Results 1 to 7 of 7
- 04-10-2010, 05:33 AM #1
Member
- Join Date
- Apr 2010
- Posts
- 10
- Rep Power
- 0
Help Creating Custom File and Adding an Editor
I am creating a program for a friend. It is a "Quilt Designer" program. The program allows you to design (draw patterns, blocks, and quilts and add color to them) quilts and patterns ext. First, I would like to know if there is some kind of JPane, or box that I can be used to draw onto.
I also would like to know how to save them as a file.
-
You may wish to look into drawing onto a BufferedImage object, displaying this in a JPanel's paintComponent method (check out Graphics#drawImage(...)), and then saving it with the help of one of the static ImageIO.write(...) overloads.
- 04-10-2010, 06:47 PM #3
Member
- Join Date
- Apr 2010
- Posts
- 10
- Rep Power
- 0
Sorry, I forgot to mention.... would you be able to load it back into the editor? I would like for the user to be able to save it as a project and come back to it. Would this method work?
-
Depends. If you just want to save and reload the image, no problem. If on the other hand you want to save the logic used to draw the image (filled ellipse here, drawn circle there), then you would have to go another route, perhaps using Serialization.
- 04-14-2010, 01:27 AM #5
Member
- Join Date
- Apr 2010
- Posts
- 10
- Rep Power
- 0
How would you use this.... sterilization method? Yes, I would like the users to be able to edit it.
-
- 04-23-2010, 04:06 AM #7
Member
- Join Date
- Apr 2010
- Posts
- 10
- Rep Power
- 0
Similar Threads
-
AutoCompile in Eclipse Custom Editor
By SSG_JJV in forum EclipseReplies: 2Last Post: 01-29-2009, 04:09 AM -
Adding custom buttons - JOptionPane.showOptionDialog(...)
By Java Tip in forum Java TipReplies: 0Last Post: 12-17-2007, 09:46 AM -
Adding custom highlight to JEditorPane
By andrewb in forum AWT / SwingReplies: 0Last Post: 06-22-2007, 06:48 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks