Java程序设计课程设计
题 目 巢湖学院计算机与信息工程学院实验报告记事本程序
院(系) 计算机与信息工程学院
专 业 软件工程
学生姓名 杨 旋 顾莹莹 杨灿芳
学 号 13014046 13014009 13014044
指导教师 许荣泉 职称 讲 师
论文字数 15875
完成日期: 20##年 1月 3 日
目 录
第1章绪论... 2
1.1 开发工具和开发环境... 2
1.1.1 Eclipse. 2
1.1.2 JDK(Java Development Kit) 2
1.2 设计背景………………………………………………………………………………….2
第2章设计与分析... 2
2.1 需求分析... 2
2.2 功能模块划分... 3
2.2.1 菜单栏... 3
2.2.2 文本输入区... 3
2.2.3 状态栏... 3
2.2.4 右键菜单... 3
2.3 功能模块流程图... 3
第3章记事本程序设计... 3
3.1 概要设计... 4
3.1.1 界面设计... 4
3.1.2 功能设计... 4
3.1.3 代码设计... 4
3.2 详细代码... 4
第4章程序测试... 9
4.1 打开程序... 9
4.2 点击菜单... 9
4.3 输入文字... 10
4.4 点击子菜单... 10
第5章附录... 11
5.1 心得体会... 11
5.2 参考文献... 11
5.2 源码... 11
Eclipse是一个开放源代码的、基于Java的可扩展开发平台。就其本身而言,它只是一个框架和一组服务,用于通过插件组件构建开发环境。利用它我们可以在数据库和JavaEE的开发、发布以及应用程序服务器的整合方面极大的提高工作效率。它是功能丰富的JavaEE集成开发环境,包括了完备的编码、调试、测试和发布功能,完整支持HTML,Strut,JSP,CSS,Javascript,SQL,Hibernate[3]。
1.1.2 JDK(Java Development Kit)
JDK(Java Development Kit)是Sun Microsystems针对Java开发员的产品。自从Java推出以来,JDK已经成为使用最广泛的Java SDK。JDK 是整个Java的核心,包括了Java运行环境,Java工具和Java基础的类库。JDK是学好Java的第一步。而专门运行在x86平台的Jrocket在服务端运行效率也要比Sun JDK好很多。从SUN的JDK5.0开始,提供了泛型等非常实用的功能,其版本也不断更新,运行效率得到了非常大的提高[4]。
1.2设计背景
“记事本”的功能虽然连“写字板”都比不上,但它还是有它自己的独门绝技的。下面我们就来看看记事本吧。相对于微软的 Word来说“记事本”的功能确实是太单薄了,只有:新建,保存,打印,查找,替换这几个功能。但是“记事本”却拥有一个Word不可能拥有的优点:打开 速度快,文件小。我相信对于这一点大家一定是深有感触地,一点就打开;同样的文本文件用Word保存和用记事本保存的文件大小就大不相同,所以对于大小在 64KB以下的纯文本的保存最好还是采用记事本。 记事本另一项不可取代的功能是:可以保存无格式文件。你可以把记事本编辑的文件保存为:“.html”, “.java”,“.asp”等等任意格式。这使得“记事本”又找到了一个新的用途:作为程序语言的编辑器。翻开任何一本介绍一门编程语言的入门教材,里面都会建议学生在记事本中编写源程序。 在此我们利用Java的文件输入输入流来实现简单的记事本小程序。
2.1需求分析
现在网络上各种文档编辑器数不胜数,有EmEditor ,UEStudio ,GridinSoft Notepad ,Notepad++,win32pad ,SkimEdit,UniRed, xint 。功能也是应有尽有,有能改变字体的,有能改变文字颜色的。但是,这些软件又存在各种各样的瑕疵或问题:有的文件体积相对于一般文字编辑来说太大;有的功能太繁杂,使初级使用者一时难以掌握。仅从日常应用方面来说,一个文本编辑器只需一些简单实用的功能就够了。本程序设计就是依照这样一种使用需要设计了一个简单的记事本程序。
2.2功能模块分析
2.2.1菜单栏
(1) 菜单中有“文件”,“编辑”,“设置”,“关于”四个主菜单。
(2) “文件”有“打开”“保存”“退出”三个子菜单:分别用于打开文件,保存文件,退出记事本。
(3) “编辑”中有“撤销”,“恢复”,“剪切”“复制”“粘贴”“剪贴”,“删除”六个子菜单:用于剪切文字,复制文字,粘贴文字等一系列操作。
(4) “设置”中有“自动换行”,“字体颜色”,“恢复设置”三个子菜单,分别用于设置是否自动换行,字体颜色等。
(5) “关于”菜单中有关于记事本程序的制作日期,作者等信息
2.2.2文本输入区
用到了“JTextArea”,给用户输入文字
2.2.3状态栏
此栏主要功能是显示出字符总长、总行数、当前行、当前列。
2.2.4右键菜单
此部分为用户设计右键操作,方便用户进行一系列的编辑操作,增强本记事本的用户体验性能。
2.3功能模块流程图
3.1概要设计
设计两个类,一个Notepad类继承JFrame类,然后在Notepad类中添加文件打开,新建,保存等方法,就可以直接在编译器中运行程序。
2.1.1:界面设计
在主界面中设计一个新建对象Notepad,由Notepad继续自JFrame,故得到Notepad容器,并在其中加入一个下拉菜单和一个文本域控件,把该容器设置为GridLayout(2,1)布局。
3.1.2:功能设计
在下拉菜单中加入子菜单并进行监听,分别实现对文件的操作功能。点击不同菜单项时,显示不同界面。
3.1.3:代码设计
编写每个控件的相关代码,并进行调试。
3.2详细代码
3.2.1:界面设计
创建一个下拉菜单和文本域,在文本域中显示编辑的文件信息。
JMenu fileMenu=new JMenu("文件(F)") ;
JMenuItem newItem=new JMenuItem("新建");
JMenuItem openItem=new JMenuItem("打开...");
JMenuItem saveItem=new JMenuItem("另存为...");
JMenuItem copyItem=new JMenuItem("复制");
JMenuItem tieItem=new JMenuItem("粘贴");
JMenuItem aboutItem=new JMenuItem("关于程序");
JMenuItem exitItem= new JMenuItem("退出");
JMenu formatMenu=new JMenu("设置(S)");
String colors[]={"黑色","蓝色","红色","绿色","粉色","桔黄色"};
JMenu colorMenu=new JMenu("颜色");
JMenu sizeMenu=new JMenu("大小");String size[]={"10","16","24","36"};
String fontNames[]={"幼圆","微软雅黑","隶书","楷体_GB2312", "华文新魏"};
JMenu fontMenu=new JMenu("字体");
String styleNames[]={"加黑","斜体"};
JMenu FindMenu = new JMenu("查找(T)");
FindMenu.setMnemonic('T');
JMenuItem searchMenu = new JMenuItem("查找");
JMenuItem replaceMenu = new JMenuItem("替换");
JMenu lookMenu=new JMenu("查看(L)");//设置菜单项
JMenuItem taiItem=new JMenuItem("状态栏");
JMenu helpMenu=new JMenu("帮助(H)"); //设置菜单项
JMenuItem helpItem=new JMenuItem("帮助主题");
helpMenu.add(helpItem);
helpMenu.addSeparator();//设置分割线
JMenuItem about1Item=new JMenuItem("关于记事本...");
界面如下:
3.2.2功能设计
Ø 打开窗口事件OpenHander:
class OpenHandler implements ActionListener{
publicvoid actionPerformed(ActionEvent e)
{
JFileChooser jc=new JFileChooser();
int rVal=jc.showOpenDialog(C3.this);//显示打开文件的对话框
if(rVal==JFileChooser.APPROVE_OPTION){
File dir=jc.getCurrentDirectory();
File file=jc.getSelectedFile();
filenameTf.setText(file.getName());
dirTf.setText(dir.toString());
//在文本域内显示文本文件内容
contentTa.setText(read(new File(dir,file.getName())));
}
if(rVal==JFileChooser.CANCEL_OPTION)
{
filenameTf.setText("你取消了当前选择!");
dirTf.setText(" ");
}
}
}
Ø 打开时读取文字事件:
private String read(File file){//打开时的读取
try{
BufferedReader reader=new BufferedReader(
new InputStreamReader(new FileInputStream(file),"GBK"));
String data=null;
StringBuffer buffer=new StringBuffer();
while((data=reader.readLine())!=null)
buffer.append(data+"\n");
reader.close();
return buffer.toString();
}
catch(IOException e)
{
thrownew RuntimeException(e);
}
}
Ø 保存事件SaveHandler:
class SaveHandler implements ActionListener{ //保存
publicvoid actionPerformed(ActionEvent e)
{
JFileChooser jc=new JFileChooser();
int rVal=jc.showSaveDialog(C3.this);//显示保存文件的对话框
if(rVal==JFileChooser.APPROVE_OPTION){
File dir=jc.getCurrentDirectory();
File file=jc.getSelectedFile();
filenameTf.setText(file.getName());
dirTf.setText(dir.toString());
write(new File(dir,file.getName()),contentTa.getText());
}
if(rVal==JFileChooser.CANCEL_OPTION)
{
filenameTf.setText("你取消了当前选择!");
dirTf.setText(" ");
}
}
}
Ø 粘贴文件:
tieItem.addActionListener(new ActionListener() //响应粘贴事件
{
publicvoid actionPerformed(ActionEvent event){
contentTa.setText(contentTa.getText()+str);
}
});
Ø 查找替换功能:
public void showFind(){
setTitle("查找");
setSize(280,60);
setVisible(true);
}
public void showReplace(){
setTitle("查找替换");
setSize(280,110);
setVisible(true);
}
private void find(){
String text=ta.getText();
String str=tFind.getText();
int end=text.length();
int len=str.length();
int start=ta.getSelectionEnd();
if(start==end) start=0;
for(;start<=end-len;start++){
if(text.substring(start,start+len).equals(str)){
ta.setSelectionStart(start);
ta.setSelectionEnd(start+len);
return;
}
}
//若找不到待查字符串,则将光标置于末尾
ta.setSelectionStart(end);
ta.setSelectionEnd(end);
}
public Button getBFind() {
return bFind;
}
private void replace(){
String str=tReplace.getText();
if(ta.getSelectedText().equals(tFind.getText()))
ta.replaceRange(str,ta.getSelectionStart(),ta.getSelectionEnd());
else find();
}
4.1打开程序
4.2点击菜单
4.3输入文字
4.4点击子菜单
5.1心得体会
此次课程设计有我们寝室一起共同合作完成,花费的时间整整两天。在这期 间我们共同协作,互帮互助取得了很好的效率,也为我们构建和谐寝室,学习气氛良好寝室做出了一定的贡献。在这期间我领略到了团队协作的重要性,也看到了团队合作的高效率性。还有通过这次试验我学习到了其他室友的一些学习方法,比如追查API,如何在短时间内学习一个自己不懂的东西那就是利用好所有的搜索引擎。总之此次课程设计不仅在知识少我是长了见识,在生活上我也长了见识。
5.2参考文献
a.黄晓东 等编著 Java课程设计案例精编(第二版)[M].北京:中国水利水电出版社,2007
b.李兴华 等编著 Java开发实战经典Java开发实战经典北京:清华大学出版社,2009
c..李尊朝 苏军 Java程序设计(第二版) 图形用户界面设计、Swing组件中国铁道出版社,2007
5.3源码
package p1;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.io.*;
publicclass Notepad extends JFrame {
/**
* 记事本程序
*/
privatestaticfinallongserialVersionUID = 1L;
//定义菜单项
privatefinal Color colorValues[]={Color.BLACK,
Color.BLUE,Color.RED,Color.GREEN,Color.PINK,
Color.ORANGE};
private JRadioButtonMenuItem colorItems[],fonts[],sizeItems[];
private JCheckBoxMenuItem styleItems[];
private JLabel displayLabel;
private ButtonGroup fontGroup,colorGroup,sizeGroup;
//创建按钮组对象,实现JRadioButton多选一功能
privateint style;
//定义字体大小
int fonti=10;
Font font;
//JRadioButton r1,r2,r3; //声明按钮对象
ButtonGroup bg=new ButtonGroup( );
//
private String str=new String();//用来存放用户当前选择的文本
//
private JTextField
filenameTf=new JTextField(),
dirTf=new JTextField();
private JPanel optPane=new JPanel();
private JPanel navigetePane=new JPanel();
private JTextArea contentTa=new JTextArea(5,20);
//
public Notepad(String title){
super(title);
//设置字体大小
// r1=new JRadioButton("10");
//r1.addActionListener(new sizeHandler());
// optPane.add(r1); //加载按钮到界面上
//r2=new JRadioButton("16");
//r2.addActionListener(new sizeHandler());
//optPane.add(r2);
// r3=new JRadioButton("24");
//r3.addActionListener(new sizeHandler());
// optPane.add(r3);
// bg.add(r1); //加载按钮到按钮组
// bg.add(r2);
// bg.add(r3);
//
dirTf.setEditable(false); // 设置为不可编辑
filenameTf.setEditable(false); //设置为不可编辑
navigetePane.setLayout(new GridLayout(2,1));
navigetePane.add(filenameTf); //添加
navigetePane.add(dirTf);
Container contentPane=getContentPane();
contentPane.add(optPane,BorderLayout.SOUTH);
contentPane.add(navigetePane,BorderLayout.NORTH);
contentPane.add(new JScrollPane(contentTa),BorderLayout.CENTER);
setSize(500,300);
setVisible(true);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //设置响应关闭按钮
JMenu fileMenu=new JMenu("文件(F)") ;
fileMenu.setMnemonic('F');//设置快捷键
JMenuItem newItem=new JMenuItem("新建");
fileMenu.add(newItem);
newItem.addActionListener(
new ActionListener(){//显示消息对话框
publicvoid actionPerformed(ActionEvent event)
{
contentTa.setText(" ");
}
} );
//
JMenuItem openItem=new JMenuItem("打开...");
fileMenu.add(openItem);
openItem.addActionListener(new OpenHandler());
JMenuItem saveItem=new JMenuItem("另存为...");
fileMenu.add(saveItem);
fileMenu.addSeparator();//设置分割线
saveItem.addActionListener(new SaveHandler());
JMenuItem copyItem=new JMenuItem("复制");
copyItem.setMnemonic('C');//设置快捷键
fileMenu.add(copyItem);
copyItem.addActionListener(new ActionListener() //响应复制事件
{
publicvoid actionPerformed(ActionEvent event)
{
str=contentTa.getSelectedText();
}
});
//
JMenuItem tieItem=new JMenuItem("粘贴");
fileMenu.add(tieItem);
tieItem.setMnemonic('V');//设置快捷键
fileMenu.addSeparator();//设置分割线
tieItem.addActionListener(new ActionListener() //响应粘贴事件
{
publicvoid actionPerformed(ActionEvent event){
contentTa.setText(contentTa.getText()+str);
}
});
//
JMenuItem aboutItem=new JMenuItem("关于程序");
fileMenu.add(aboutItem);
aboutItem.addActionListener(
new ActionListener(){ //显示消息对话框
publicvoid actionPerformed(ActionEvent event)
{
JOptionPane.showMessageDialog(Notepad.this,
"这是(*^__^*)的记事本","About",JOptionPane.PLAIN_MESSAGE);
}
});
JMenuItem exitItem= new JMenuItem("退出");
fileMenu.add(exitItem);
exitItem.addActionListener( //响应退出事件
new ActionListener(){
publicvoid actionPerformed(ActionEvent event)
{
System.exit(0);
}
});
JMenuBar bar=new JMenuBar();
setJMenuBar(bar); //在frame中设置菜单条
bar.add(fileMenu);
JMenu formatMenu=new JMenu("设置(S)");
formatMenu.setMnemonic('S');
String colors[]={"黑色","蓝色","红色","绿色","粉色","桔黄色"};
JMenu colorMenu=new JMenu("颜色");
JMenu sizeMenu=new JMenu("大小");
String size[]={"10","16","24","36"};
sizeItems=new JRadioButtonMenuItem[size.length];
sizeGroup=new ButtonGroup();
//
colorItems=new JRadioButtonMenuItem[colors.length];
colorGroup=new ButtonGroup();
ItemHandler itemHandler=new ItemHandler();
for(int count=0;count<colors.length;count++){
colorItems[count]=
new JRadioButtonMenuItem(colors[count]);
colorMenu.add(colorItems[count]);
colorGroup.add(colorItems[count]);
colorItems[count].addActionListener(itemHandler);
}
colorItems[0].setSelected(true);
formatMenu.add(colorMenu);
formatMenu.addSeparator();//设置分割线
sizeItems=new JRadioButtonMenuItem[colors.length];
sizeGroup=new ButtonGroup();
for(int count=0;count<size.length;count++){
sizeItems[count]=
new JRadioButtonMenuItem(size[count]);
sizeMenu.add(sizeItems[count]);
sizeGroup.add(sizeItems[count]);
sizeItems[count].addActionListener(itemHandler);
}
formatMenu.add(sizeMenu);
sizeItems[0].setSelected(true);
formatMenu.addSeparator();//设置分割线
String fontNames[]={"幼圆","微软雅黑","隶书","楷体_GB2312",
"华文新魏"};
JMenu fontMenu=new JMenu("字体");
fonts=new JRadioButtonMenuItem[fontNames.length];
fontGroup=new ButtonGroup();
for(int count=0;count<fonts.length;count++){
fonts[count]=new JRadioButtonMenuItem(fontNames[count]);
fontMenu.add(fonts[count]);
fontGroup.add(fonts[count]);
fonts[count].addActionListener(itemHandler);
}
fonts[0].setSelected(true);
fontMenu.addSeparator();//设置分割线
String styleNames[]={"加黑","斜体"};
styleItems=new JCheckBoxMenuItem[styleNames.length];
StyleHandler styleHandler=new StyleHandler();
for(int count=0;count<styleNames.length;count++){
styleItems[count]=new JCheckBoxMenuItem(styleNames[count]);
fontMenu.add(styleItems[count]);
styleItems[count].addItemListener(styleHandler);
}
formatMenu.add(fontMenu);
bar.add(formatMenu);//添加到菜单项
JMenu FindMenu = new JMenu("查找(T)");
FindMenu.setMnemonic('T');
JMenuItem searchMenu = new JMenuItem("查找");
JMenuItem replaceMenu = new JMenuItem("替换");
FindMenu.add(searchMenu);
FindMenu.add(replaceMenu);
searchMenu.addActionListener(
new ActionListener(){ //显示消息对话框
publicvoid actionPerformed(ActionEvent event)
{
JFrame ss = new JFrame("查找");
JLabel tt = new JLabel("查找");
JTextField txt = new JTextField();
JButton but = new JButton("查找");
ss.setLayout(null);
ss.setLocation(150,150);
Dimension dim = new Dimension();
dim.setSize(300, 100);
tt.setBounds(10,20, 40, 20);
txt.setBounds(70,20,100,20);
but.setBounds(190,20,80,20);
but.addActionListener(
new ActionListener(){ //显示消息对话框
publicvoid actionPerformed(ActionEvent event)
{
JOptionPane.showMessageDialog(Notepad.this,
"查找成功了","查找",JOptionPane.PLAIN_MESSAGE);
}
});
ss.add(but);
ss.add(txt);
ss.add(tt);
ss.setSize(dim);
ss.setVisible(true);
}
});
replaceMenu.addActionListener(
new ActionListener(){ //显示消息对话框
publicvoid actionPerformed(ActionEvent event)
{
JFrame ss = new JFrame("替换");
JLabel tt = new JLabel("替换");
JTextField txt = new JTextField();
JButton but = new JButton("替换");
ss.setLayout(null);
ss.setLocation(150,150);
Dimension dim = new Dimension();
dim.setSize(300, 100);
tt.setBounds(10,20, 40, 20);
txt.setBounds(70,20,100,20);
but.setBounds(190,20,80,20);
but.addActionListener(
new ActionListener(){ //显示消息对话框
publicvoid actionPerformed(ActionEvent event)
{
JOptionPane.showMessageDialog(Notepad.this,
"替换成功了","替换",JOptionPane.PLAIN_MESSAGE);
}
});
ss.add(but);
ss.add(txt);
ss.add(tt);
ss.setSize(dim);
ss.setVisible(true);
}
});
bar.add(FindMenu);
JMenu lookMenu=new JMenu("查看(L)");//设置菜单项
JMenuItem taiItem=new JMenuItem("状态栏");
lookMenu.add(taiItem);
taiItem.addActionListener(
new ActionListener(){ //显示消息对话框
publicvoid actionPerformed(ActionEvent event)
{
JOptionPane.showMessageDialog(Notepad.this,
"欢迎使用杨旋的记事本程序!","状态栏",JOptionPane.PLAIN_MESSAGE);
}
});
bar.add(lookMenu);
JMenu helpMenu=new JMenu("帮助(H)"); //设置菜单项
JMenuItem helpItem=new JMenuItem("帮助主题");
helpMenu.add(helpItem);
helpMenu.addSeparator();//设置分割线
JMenuItem about1Item=new JMenuItem("关于记事本...");
helpMenu.add(about1Item);
bar.add(helpMenu);
about1Item.addActionListener(
new ActionListener(){//显示消息对话框
publicvoid actionPerformed(ActionEvent event)
{
JOptionPane.showMessageDialog(Notepad.this,
" 1993083082536杨旋!","关于记事本",JOptionPane.PLAIN_MESSAGE);
}
}
);
getContentPane().setBackground(Color.WHITE);
setSize(700,500);
setVisible(true);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
publicstaticvoid main (String[] args)
{
new Notepad("杨旋的记事本");
}
class OpenHandler implements ActionListener{ //打开窗口事件
publicvoid actionPerformed(ActionEvent e)
{
JFileChooser jc=new JFileChooser();
int rVal=jc.showOpenDialog(Notepad.this);//显示打开文件的对话框
if(rVal==JFileChooser.APPROVE_OPTION){
File dir=jc.getCurrentDirectory();
File file=jc.getSelectedFile();
filenameTf.setText(file.getName());
dirTf.setText(dir.toString());
//在文本域内显示文本文件内容
contentTa.setText(read(new File(dir,file.getName())));
}
if(rVal==JFileChooser.CANCEL_OPTION)
{
filenameTf.setText("你取消了当前选择!");
dirTf.setText(" ");
}
}
}
class SaveHandler implements ActionListener{ //保存
publicvoid actionPerformed(ActionEvent e)
{
JFileChooser jc=new JFileChooser();
int rVal=jc.showSaveDialog(Notepad.this);//显示保存文件的对话框
if(rVal==JFileChooser.APPROVE_OPTION){
File dir=jc.getCurrentDirectory();
File file=jc.getSelectedFile();
filenameTf.setText(file.getName());
dirTf.setText(dir.toString());
write(new File(dir,file.getName()),contentTa.getText());
}
if(rVal==JFileChooser.CANCEL_OPTION)
{
filenameTf.setText("你取消了当前选择!");
dirTf.setText(" ");
}
}
}
//
private String read(File file){//打开时的读取
try{
BufferedReader reader=new BufferedReader(
new InputStreamReader(new FileInputStream(file),"GBK"));
String data=null;
StringBuffer buffer=new StringBuffer();
while((data=reader.readLine())!=null)
buffer.append(data+"\n");
reader.close();
return buffer.toString();
}
catch(IOException e)
{
thrownew RuntimeException(e);
}
}
privatevoid write(File file,String str)//输入文件
{
try{
PrintWriter writer=new PrintWriter(
new OutputStreamWriter(new FileOutputStream(file),"GBK"));
writer.println(str);
writer.close();
}
catch(IOException e)
{
thrownew RuntimeException(e);
}
}
//处理事件
privateclass ItemHandler implements ActionListener{
publicvoid actionPerformed(ActionEvent event)
{
for(int count=0;count<colorItems.length;count++)
if(colorItems[count].isSelected()){
contentTa.setForeground(colorValues[count]);
break;
}
//处理字体
for(int count=0;count<colorItems.length;count++)
if(event.getSource()==fonts[count]){
contentTa.setFont(new Font(fonts[count].getText(),style,fonti));
break;
}
//处理字体大小
for(int count=0;count<sizeItems.length;count++)
if(event.getSource()==fonts[count]){
String rbt=event.getActionCommand( );
if (rbt=="10") fonti=10;
elseif (rbt=="16") fonti=16;
else if(rbt=="24") fonti=24;
else fonti=36;
font=new Font(displayLabel.getFont().getName(),Font.BOLD,fonti);
contentTa.setFont(font);
break;
}
repaint();
}
}
//处理复选菜单事件
privateclass StyleHandler implements ItemListener{
publicvoid itemStateChanged(ItemEvent e){
style=0;
if(styleItems[0].isSelected())
style+=Font.BOLD;
if(styleItems[1].isSelected())
style+=Font.ITALIC;
displayLabel.setFont(new Font(displayLabel.getFont().getName(),
style,fonti));
repaint();
}
}
}
东莞理工学院《C语言程序设计》课程设计题目:图书信息管理系统院系:电子工程学院专业:电子信息工程年级:20##班别:2班指导教师:…
C语言程序设计课程设计学生姓名学号系院专业设计论文题目学生选课系统管理完成日期20xx年6月指导教师目录一实验目的二实验内容三总体…
河南理工大学计算机科学与技术学院课程设计报告20XX20XX学年第一学期课程名称C语言课程设计设计题目《小学算术运算测试》学生姓名…
C语言课程设计报告设计题目专业班级学号姓名任课老师时间目录一课程设计题目及所涉及知识点二课程设计思路及设计流程图三课程设计中遇到的…
C语言程序设计课程设计报告20xx20xx学年第1学期题目专业班级姓名学号指导教师成绩计算机科学与技术系20xx年12月31日目录…
Java程序设计实训报告实训名称仓库管理系统实训专业计算机应用班级计算机10A1学号姓名指导教师侯丽敏20xx年12月8日实训成绩…
学生实验报告册(理工类)课程名称:JAVA程序设计实验专业班级:M11计算机科学与技术II学生学号:学生姓名:所属院部:XX学院指…
Java程序设计实验指导报告书目录实验1熟悉Java开发环境2实验2简单的输入输出处理3实验3类的练习6实验4Java图形用户界面…
Java程序设计课程设计报告20xx20xx年度第1学期Hannio塔专业学生姓名班级学号指导教师完成日期计算机科学技术网络工程马…
Java课程设计报告课目计算器学院基础学院班级光信息20xx1学生指导教师丁振凡张晓瑞辅导教师江宇完成时间20xx年7月1日课程设…
实验报告计算机与信息工程学院实验中心学期20xx20xx课程名称Java程序设计实验班级信息1202姓名方逸梅学号12121002…