Solved

Public Void ActionPerformed(ActionEvent E)

Question 44

Essay

public void actionPerformed(ActionEvent e)
{
String name = answer.getText();
con.remove(greeting);
con.remove(pressMe);
con.remove(answer);
personalGreeting.setText("Hello, " + name + "! ");
con.add(personalGreeting);
con.setBackground(Color.PINK);
validate();
}
In the actionPerformed() method above, the final statement following the addition of the JLabel is validate(). Explain the validate() method and how it is used with JComponents.

Correct Answer:

verifed

Verified

In the actionPerformed() method example,...

View Answer

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions