import java.awt.*;
import java.awt.event.*;
import javax.swing.*;public class yaoli
{
public static void main (String[] args)
{
Gameframe frame = new Gameframe();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setVisible(true);
   
}
}
class Gameframe extends JFrame
{
public Gameframe()
{
setLocation(200,100);
setTitle("My Game");
    Gamepanel gamepanel = new Gamepanel();
    add(gamepanel);
    pack();
}

}
class Gamepanel extends JPanel
{
private JPanel p1;
private JTextArea text;
ImageIcon a1 = new ImageIcon("1111.jpg");
ImageIcon a2 = new ImageIcon("1.jpg");

public Gamepanel()
{
setLayout(new BorderLayout());
    p1 = new JPanel();
p1.setLayout(new GridLayout(10,10,1,1));
for(int i=0; i<100; i++)
{
JLabel label = new JLabel();
label.setIcon(a1);
p1.add(label);
}
    add(p1);
add(p1,BorderLayout.WEST);
JTextArea text = new JTextArea("");
text.setColumns(20);
JScrollPane scrol1 = new JScrollPane(text);
add(scrol1,BorderLayout.EAST);
}

}
说明: //这是我在同一个文件夹中的两个名为1111和1的图片
        ImageIcon a1 = new ImageIcon("1111.jpg");
ImageIcon a2 = new ImageIcon("1.jpg");
       就是想做一个十乘十的label,
       不知道为什么图片总是太大了,溢出框架和面板的大小,而我设置了面板和label的大小根本没有用,,不知道怎么设计的,希望能有详解~~
----------------------
新手上路,请多关照