package com.mr.draw;//类所在的包名
import javax.swing.Jframe;//引入窗体类
public class DrawPictureframe extends Jframe {// 继承窗体类
public DrawPictureframe() {
setResizable(false);// 窗体不能改变大小
setTitle("画图程序");// 设置标题
setDefaultCloseOperation(Jframe.EXIT_ON_CLOSE);// 窗体关闭则停止程序
setBounds(500, 100, 574, 460);// 设置窗口位置和宽高
} // DrawPictureframe()结束
public static void main(String[] args) {
DrawPictureframe frame = new DrawPictureframe();// 创建窗体对象
frame.setVisible(true);// 让窗体可见
} // main()结束
} // DrawPictureframe类结束
以上为源代码



