Top Posters
Since Sunday
6
o
5
5
b
4
s
3
j
3
b
3
m
3
K
3
g
3
L
3
w
3
New Topic  
Eels Eels
wrote...
Posts: 716
Rep: 0 0
7 years ago
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 SunnyFace image will resize itself to fit on imageLabel.
B) The SunnyFace image will resize itself to fit on imagePanel.
C) The JFrame that encloses the window will resize itself to accommodate the SunnyFace image.
D) imagePanel will resize itself to accommodate the SunnyFace image.
Textbook 
Starting Out with Java: Early Objects

Starting Out with Java: Early Objects


Edition: 4th
Author:
Read 170 times
3 Replies
Replies
Answer verified by a subject expert
ToothyToothy
wrote...
Top Poster
Posts: 744
Rep: 4 0
7 years ago
Sign in or Sign up in seconds to unlock everything for free
More solutions for this book are available here
1

Related Topics

Eels Author
wrote...
7 years ago
I was nearly about to give up, thanks
wrote...
7 years ago
Thanks for providing feedback
New Topic      
Explore
Post your homework questions and get free online help from our incredible volunteers
  1131 People Browsing
Related Images
  
 302
  
 146
  
 280
Your Opinion
Which 'study break' activity do you find most distracting?
Votes: 820