如何在eclipse luna中运行java applet和swing程序

时间:2015-06-18 08:10:35

标签: java eclipse swing applet

import java.awt.Color;
import java.awt.Graphics;

import javax.swing.JPanel;

class MyDrawPanel extends JPanel {

public void paintComponent(Graphics g) {

    g.setColor(Color.orange);
    g.fillRect(20, 50, 10, 100);

}

}

告诉我如何在eclipse中执行此代码

1 个答案:

答案 0 :(得分:0)

尝试使用标准快捷键: Ctrl + F11