October 21st, 2013, 10:41 AM
I've been trying to get some Java practice recently, and I've decided it would be neat if I could make a program that lets the user draw up some UML diagrams for programming. Problem is I'm not entirely sure what I'll need to use to get this done. Here's basically what I want the program to do:
-User can drag and drop classes and objects onto a grid where they can then resize them, edit their fields and all that, and connect them to other objects. Anything you might want in a UML diagram, basically.
-User can save/load diagrams.
-User can export a diagram as an image, maybe a jpg or png.
I guess that's it for now. I'll need to use the Swing classes for the GUI, and probably the Graphics classes for drawing things on the grid. Not sure what else I'll need though. Any suggestions?
October 21st, 2013, 01:21 PM
Define a class for each shape you want to show. Have the class draw itself and be sensitive to mouse drags so it can be dragged and resized.