In the following code the setPreferredSize method sets the size of the text, "Have a good day".
label = new Jlabel("Have a good day", SwingConstants.CENTER);
label.setPreferredSize(new Dimension(400,200));
Correct Answer:
Verified
Q38: If addressList exists and has values stored
Q39: What will display when the following code
Q40: Which of the following is NOT a
Q41: When you write a change listener class
Q42: The JMenuBar method is a(n):
A) JFrame method
B)
Q44: When a JList component is added to
Q45: A menu system may consist of each
Q46: What will be the results of executing
Q47: Which of the following statements creates a
Q48: Which of the following is NOT a
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents