• 1 reply
  • Latest Post - ‏2004-11-18T14:31:00Z by SystemAdmin
3659 Posts

Pinned topic draw UML diagram with Rational Rose

‏2004-11-01T11:09:09Z |
Hello all

I use a OptionBox to input a string value. I do not know I should creat a class for it or not to
with other classes in a UML diagram. For example, I use JOptionPane in Java to creat this box:

String input = (String)JOptionPane.showInputDialog(this, "Enter string
input", "Add input", JOptionPane.QUESTION_MESSAGE, NULL,

(This code is written by Java)

When I click on a button, this OptionBox will appear and I can input some text.
This text will be save in database if I click OK (of this OptionBox

Do you think I should create a class for this OptionBox in a class diagram.
Thank you
Updated on 2004-11-18T14:31:00Z at 2004-11-18T14:31:00Z by SystemAdmin
  • SystemAdmin
    3659 Posts

    Re: draw UML diagram with Rational Rose

    Usually, widgets do not become classes unless you are modifying a standard widget so it will be used throughout an application in a standardized way. What information is the OptionBox collecting? Normally, that information is about some other class in your applications, and that is where the attribute that stored the information would reside. Widgets are almost always transient features of the system that get created and destroyed as needed. A widget and its state aren't usually saved for future use.