What will display when the following code is executed? imagePanel = new JPanel() ;
ImageLabel = new JLabel() ;
ImagePanel.Add(imageLabel) ;
ImageIcon sunnyFaceImage =
New ImageIcon("SunnyFace.gif") ;
ImageLabel.setIcon(sunnyFaceImage) ;
Pack() ;
A) The JFrame that encloses the window will resize itself to accommodate the SunnyFace image.
B) imagePanel will resize itself to accommodate the SunnyFace image.
C) The SunnyFace image will resize itself to fit on imageLabel.
D) The SunnyFace image will resize itself to fit on imagePanel.
Correct Answer:
Verified
Q22: The JComboBox class is in the:
A) javax.swing
Q28: A tool tip is:
A) a guide provided
Q32: If a user enters a value in
Q37: The following statement: textList.setSelectionMode(
ListSelectModel.SINGLE_INTERVAL_SELECTION);
A) sets the textList
Q38: A menu system may consist of each
Q39: If addressList exists and has values stored
Q42: The JMenuBar method is a(n):
A) JFrame method
B)
Q49: A label's preferred size is determined only
Q52: By default the scroll bars are always
Q56: What does the following statement do?
JTextArea textField
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