文档介绍:专业班级
信管1102
学号
姓名
实验学时
6
实验类型
综合性
实验地点
实验时间
2012-12-11
指导老师
实验成绩
年月日
实验目的
掌握用户图形界面设计(GUI)的设计方法,了解布局管理器的知识,了解树形分层结构,掌握Java中的控件的使用。
实验内容
利用Java中的用户GUI图形界面设计、文件操作、数据库编程等方面的知识,实现电子记事本的设计与实现。
三、实验要求
该实验应能体现本课程中的综合知识;
该电子记事本应具有实用性。
界面友好,操作简单。
四、实验步骤与结果:(由学生按照实验内容完成)
import .*;
import ;
import .*;
import .*;
import .*;
import .*;
import ;
public class gf extends JFrame implements ActionListener,ItemListener
{
JTextArea tf=new JTextArea();
JLabel lb1=new JLabel("字体");
String ziti[]={"宋体","黑体","楷体","Arial","Courier","TimesRoman","Helvetica"};
JLabel lb2=new JLabel("字体样式");
String yangshi[]={"粗体","斜体","正常体","粗体倾斜"};
JLabel lb3=new JLabel("字号");
String zihao[]={"10","20","30","40","50","60"};
JComboBox cbx1=new JComboBox();
JComboBox cbx2=new JComboBox();
JComboBox cbx3=new JComboBox();
Font font;String str; int c=20;int n=;
class savel implements ActionListener
{
public void actionPerformed(ActionEvent e)
{
JFileChooser jf = new JFileChooser();
();
}
} //保存监听
class exitl implements ActionListener
{
public void actionPerformed(ActionEvent e)
{
(0);
}
} //退出监听
class cutl implements ActionListener
{
public void actionPerformed(ActionEvent e)
{