Labeled Box

One of the homework projects for this Java class involves drawing a class diagram.  The superclass and the subclasses are in rectangles with the class name inside.

Using what’s been presented in the class, you’ve got to place the boxes, and place the class names entirely separately.  This is not ideal- what you’d want to do to draw such a diagram is use some sort of box that has a text field you can use for the class name, and place this as a unit.

So, this is my project.  I’ll document the development here.  Could be one post every couple days, if I’m moving quickly on it could be several in a day.  We’ll see.

My first step will simply draw the box and the label.  I won’t do anything to adjust the size of the text or the box to work around each other, nor will position of the label update as the box moves- though the initial label position will be based on the initial box position.  This will be of limited use, but it will form a good starting point.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s