文档介绍:
S sd4 实验二之实验报告一、实验目的: 1、为了进一步了解布局的作用,及重要性 2、学****分析软件功能,及布局实现 3、加强对 java 的了解二、实验要求: 1、模拟出界面 2、实现其所有功能(1) 焦点设置(2) 事件监听设置,文本框内容变化监听,按钮监听(3) 字体设置(4) 对话框信息提示设置三、实验步骤: 1、研究布局,模拟布局,测绘 2、组件属性设置 3、功能分析 4、实现功能四、实验结果: 源代码: package .gui; import javax.swing.*; import javax.swing.event.CaretEvent ; import javax.swing.event.CaretListener ; import javax.swing.event.ChangeEvent ; import javax.swing.event.ChangeListener ; import java.awt.event.ActionEvent; import java.awt.event.TextListener; import java.awt.event.TextEvent; import java.awt.*; import java.awt.event.ActionListener; import .util.*; public class MainFrame extends JFrame{ private JLabel ponentNames ; private JLabel ponentDescription ; private JLabel labFirstName ; private JLabel labSecondName ; private JLabel labThirdName ; private JLabel labForthName ; private JLabel labFifthName ; private JLabel labSixName ; private JLabel labSevenName ; private JLabel labEnterNumber ; private JLabel labEnterString ; private JLabel labFound ; private JLabel urrence ; private JLabel urrence ; private TextField textDisplay ; private TextField textSearch ; private JTextArea ponentDescription ; private JButton butDisplay ; private JButton butSearch ; private JButton butExit ; private JPanel paneMain ; private JPanel ponent ; private JPanel ponentNames ; private JPanel ponentDescription ; private JPanel paneEnter ; private JPanel paneFound ; private JPanel paneExit ; private JScrollPane scrollPane ; private int count ; public MainFrame() { ponentNames = new JLabel( "ponents names:" ); // 将字体设置为粗体//ponentName.setFont(); // labFirstName = new JLabel( "1. UAR Identifier" ); labSecondName = new JLabel( "2. inct Descripition of the Usability Aspect" ); labThirdName = new JLabel( "3. Evidence for the Aspect" ); labForthName = new JLabel( "4. Explanation of the Aspect" ); labFifthName = new JLabel( "5. severity of the Problem or the Benefit of the Good Feature" ); labSixName = new JLabel( "6. Possible Solutions and Potential Trade-offs" ); labSeve
内容来自淘豆网www.taodocs.com转载请标明出处.