Draw a UML class diagram for the code fragment given below:
public class StringApplet extends Applet {
private Label sampleString;
private Button showTheString;
private ButtonHandler bHandler;
private FlowLayout layout;
public StringApplet() {
sampleString = new Label(" ");
showTheString = new Button (" Show the String");
bHandler = new ButtonHandler();
layout = new FlowLayout();
showTheString.addActionListener(bHandler);
setLayout(layout);
add(sampleString);
add(showTheString);
}
class ButtonHandler implements ActionListener {
public void actionPerformed(ActionEvent e) {
samplestring.setText("Good Morning");
}
}
}
Note: The methods need not be indicated on the diagram.
No Answer is Posted For this Question
Be the First to Post Answer
Why do you canvas?
What is complexity in java?
Why should we use singleton pattern instead of static class?
what type of questions asked for barclays technologies pune please send urgent
Can we extend a class with private constructor?
Explain about java sdk?
Explain about core java?
what is the difference between java and j2ee... is that can i work j2ee on net beans IDE 6.0
When can an object reference be cast to an interface reference in java programming?
Why singleton class is used in java?
What is meant by method overriding?
what is difference between method overloading & method overridding with example?