Computer Science, asked by amritaashgupta, 7 months ago

Write a program to add images in the frame.​

Answers

Answered by kilwantsingh
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 Bhagyashribuddhiwant
1

Answer:

sorry but I am not able to help you out

Explanation:

but also mark me as brilliant

Similar questions