import java.awt.*;
import javax.swing.*;
public class TestFigurePanel extends JFrame
{
    public TestFigurePanel()
    {
     setLayout(new GridLayout(2, 3, 5, 5));
     add(new FigurePanel(FigurePanel.LINE));
     add(new FigurePanel(FigurePanel.RECTANGLE));
     add(new FigurePanel(FigurePanel.ROUND_RECTANGLE));
     add(new FigurePanel(FigurePanel.OVAL));
     add(new FigurePanel(FigurePanel.RECTANGLE, true));
     add(new FigurePanel(FigurePanel.ROUND_RECTANGLE, true));
    }
    public static void main(String[] args)
    {
     TestFigurePanel frame = new TestFigurePanel();
     frame.setSize(400, 200);
     frame.setTitle("TestFigurePanel");
     frame.setLocationRelativeTo(null);
     frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
     frame.setVisible(true);
    }
}
这道程序在最新的Eclipse中运行不了呀,怎么回事呀?一个简单的程序。呵呵