14/06/2016
// SHOW IMAGE IN FRAME...
import javax.swing.*;
class Example
{
JFrame frame;
JLabel image;
Example()
{
frame=new JFrame("Show Image");
frame.setSize(500,500);
frame.show();
frame.setLayout(null);
//path of image with image name
image=new JLabel(new ImageIcon("picture.jpg"));
frame.add(image);
//setBounds(int x_axies , int y_axies , int width , int height)
image.setBounds(50,50,400,400);
}
public static void main(String args[])
{
new Example();
}
}