//12.5
import java.awt.*;
import java.util.*;
import javax.swing.*;
import javax.swing.border.LineBorder;
public class Test extends JFrame
{
public static void main(String[] args) {
LineBorder lb = new LineBorder(Color.black,2);
Test t1 = new Test();
t1.setLayout(new GridLayout(2,2));
ImageIcon icon1 = new ImageIcon("pic/1.jpg");
ImageIcon icon2 = new ImageIcon("pic/2.jpg");
ImageIcon icon3 = new ImageIcon("pic/3.jpg");
ImageIcon icon4 = new ImageIcon("pic/4.jpg");
LineBorder lb1 = new LineBorder(Color.black,1);
JLabel jlb1 = new JLabel(icon1);
jlb1.setBorder(lb1);
t1.add(jlb1);
t1.add(new JLabel(icon2));
t1.add(new JLabel(icon3));
t1.add(new JLabel(icon4));
t1.setSize(200,200);
t1.setDefaultCloseOperation(EXIT_ON_CLOSE);
t1.setLocationRelativeTo(null);
t1.setVisible(true);
}
}