Write a program to add images in the frame.
Answers
Answered by
1
Answer:
import javax.swing.JFrame;
import javax.swing.ImageIcon;
import javax.swing.JLabel;
class ShowPicture {
public static void main(String args[]) {
JFrame frame = new JFrame();
ImageIcon icon = new ImageIcon("androidBook.jpg");
JLabel label = new JLabel(icon);
frame.add(label);
frame.setDefaultCloseOperation
(JFrame.EXIT_ON_CLOSE);
frame.pack();
frame.setVisible(true);
}
}
Explanation:
this is computer answer
ok
hope it's helpful to you
Answered by
1
Answer:
sorry but I am not able to help you out
Explanation:
but also mark me as brilliant
Similar questions
English,
3 months ago
English,
7 months ago
Biology,
7 months ago
Environmental Sciences,
11 months ago