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
what is the difference between a threads start() and run() methods? : Java thread
Why use string handling in Java?
How you can create a radio buttion using Checkbox class?
What are the advantages of arraylist over arrays?
What is the difference between a break statement and a continue statement?
Write a program to check for a prime number in java?
Can we declare array without size in java?
What is the program development process?
Which sorting algorithm is in place?
What is HashTable?
What is the main functionality of Prepared Statement?
What is re-factoring in software?