版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、中南大學(xué)SSD4課程實(shí)驗(yàn)實(shí)驗(yàn)題目exercise2學(xué)生學(xué)生學(xué)號(hào)3901130813專業(yè)班級(jí)1306需求分析觀察所給程序,模仿實(shí)現(xiàn)其所有功能。詳細(xì)設(shè)計(jì)模擬界面布局。實(shí)現(xiàn)焦點(diǎn)設(shè)置,按鈕響應(yīng),用戶使用說明框提示等功能。在“Enter a number:”之后輸入 1-7 選擇顯示相應(yīng)段落,點(diǎn)擊“Display”按鈕可在“UARcomponent description:”的文本框里顯示出對(duì)應(yīng)內(nèi)容。若輸入會(huì)有框提示。在“Enter a search string:”之后輸入想要查找的字符串,點(diǎn)擊“Search”按鈕會(huì)出現(xiàn)提框,然后會(huì)在“Found at:”下面顯示出該字符串出現(xiàn)的位置。示7附錄impo
2、rt java.awt.event.KeyEvent; import javax.swing.JOptionPane;/*To change this license header, choose License Headers in Project Properties.To change this template file, choose Tools | Templatesand open the templatehe editor.*/*author lenovo*/public claewJFrame extends javax.swing.JFrame public sic Str
3、ing s; public siccoun=0;public siccount(String ss,String st) String a= new String(ss);index=a.indexOf(st); if(index!=-1)coun+; a=a.substring(index+1); return count(a,st);elsereturn coun;/* Creates new form NewJFrame*/public NewJFrame() s=new String8;s1=This should be a unique identifier for the pure
4、s of filing. If moren one is working on the project or moren oneysis technique is being used, this identifiercould contain letters and numbers. For exle, if Chris Smind Joo are bothng an ysis, the identifier might be CS1 or JK75. If both a heuristic evaluation and a think-aloud usability study were
5、used, the identifiers might be HE6 or TA89. Follow the unique identifier with the word Problem, if the report pertains to a usability problem of theerface, or the words Good Feature, if it describes an aspect of theerface you feel should be pin anyredesign.;s2=This description will be used as the na
6、me of this UAR when you talk about its relation to other UARs. Make the name as short as sible (about three to five words) but still descriptive and distinguishable from other aspects of the system. If this UAR is about a problem (as op ed to a good feature), make sure you have a name t describes th
7、e problem, rather n a solution.;s3=This is the objective supporting material t justifies your identifying the aspe worthy of report. This section needs to contain enough information for a reader of this UAR to understand what triggered the report. For an HE report, for instance, this could be an ima
8、ge of a cluttered screen and the heuristic about aesthetics and minimalist design. In a think-aloud study this is usually what was on the screen (a screen shot or description), what the user did (keystrokes, mouse movements), what the system did in response to any user actions, and what the user sai
9、d. You need to include enough pertinent information about the identification of an aspect for the reader to understand what the yst was thinking when the aspect was identified (for HE) or what the user was trying to do when the aspect either hindered or facili ed his or her progress.;s4=This is your
10、 re ion of the evidence. t is, for a think-aloud usability test, why you think what happened happened, or, for an HE, why you think the aspect was designed the way it was. You need to provide enough content his explanation for the reader to understand the problem-even if they do not know the system
11、oras well as you do.;s5=This is your reasoning about how important it is to either fix this problem or preserve this good feature. This includes how frequently the users will experience this aspect, whether they are likely to learn how it works, whether it will affect new users, casual users, experi
12、enced users, etc.;s6=If this aspect is a problem (as oped to a good feature to be pin the next verof the software), this is the place to proe a solution. It is not nesary to have a solution as soon as you identify a problem-you might find after yzing the wholeerface t many problems are related and c
13、l be fixed by making a singroad change instead of making several small changes. However, if you do proe asible solution, report anypotential design trade-offst you see;s7=It is often the case t UARs are related to each other. This is where you record which UARs this one is related to and a s ement a
14、bout how it is related. Make sure tall the related UARs po to each other. It is a common mistake to enter the po er o a newly created UAR, but neglect to go back to the previous ones t it relates to and update their UARs.;ponents(); jButton1.setMnemonic(KeyEvent.VK_D); jButton2.setMnemonic(KeyEvent.
15、VK_S); jButton3.setMnemonic(KeyEvent.VK_X); jTextField1.requestFocus();/*This method is called from withhe constructor to initialize the form.WARNING: Do NOT modify this code. The content of this method is alwaysregenerated by the Form Editor.*/ SuppressWarnings(unchecked)/ private voidponents() jLa
16、bel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jLabel5 = new javax.swing.JLabel(); jLabel6 = new javax.swing.JLabel(); jLabel7 = new javax.swing.JLabel(); jLabel8 = new javax.swing.JLabel(); jLabel9 = new j
17、avax.swing.JLabel(); jTextField1 = new javax.swing.JTextField(); jLabel10 = new javax.swing.JLabel(); jLabel11 = new javax.swing.JLabel(); jTextField2 = new javax.swing.JTextField(); jButton1 = new javax.swing.JButton(); jButton2 = new javax.swing.JButton(); jButton3 = new javax.swing.JButton();jScr
18、ollPane1 = new javax.swing.JScrollPane(); jTextPane2 = new javax.swing.JTextPane(); jLabel12 = new javax.swing.JLabel(); jLabel13 = new javax.swing.JLabel(); jLabel14 = new javax.swing.JLabel();setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setTitle(Exercise 2);setName(Exercise
19、 2); / NOI18NsetResizable(false);jLabel1.setFont(new java.awt.Font(宋體, 1, 14); / NOI18N jLabel1.setText(UAR component description:);jLabel2.setFont(new java.awt.Font(宋體, 1, 14); / NOI18N jLabel2.setText(UAR compoments names:);jLabel3.setFont(new java.awt.Font(宋體, 0, 14); / NOI18N jLabel3.setText(1.
20、UAR Identfier);jLabel4.setFont(new java.awt.Font(宋體, 0, 14); / NOI18N jLabel4.setText(2. Succinct Description of the Usability Aspect);jLabel5.setFont(new java.awt.Font(宋體, 0, 14); / NOI18N jLabel5.setText(3. Evidence for the Aspect);jLabel6.setFont(new java.awt.Font(宋體, 0, 14); / NOI18N jLabel6.set
21、Text(4. Explanation of the Aspect);jLabel7.setFont(new java.awt.Font(宋體, 0, 14); / NOI18N jLabel7.setText(5. Serveity of the Promblem or Benefit of the Good Feature);jLabel8.setFont(new java.awt.Font(宋體, 0, 14); / NOI18N jLabel8.setText(6.sible Solutions and Potential Trade-offs);jLabel9.setFont(new
22、 java.awt.Font(宋體, 0, 14); / NOI18N jLabel9.setText(7. Relationship to Other Usability Aspects);jLabel10.setFont(new java.awt.Font(宋體, 0, 14); / NOI18N jLabel10.setText(Enter a number:);jLabel11.setText(Enter a search string :); jButton1.setText(Display);jButton1.addActionListener(new java.awt.event
23、.ActionListener() public void actionPerformed(java.awt.event.ActionEvent evt) jButton1ActionPerformed(evt););jButton2.setText(Search);jButton2.addActionListener(new java.awt.event.ActionListener() public void actionPerformed(java.awt.event.ActionEvent evt) jButton2ActionPerformed(evt););jButton3.set
24、Text(Exit);jButton3.addActionListener(new java.awt.event.ActionListener() public void actionPerformed(java.awt.event.ActionEvent evt) jButton3ActionPerformed(evt););jTextPane2.setEditable(false); jScrollPane1.setViewportView(jTextPane2);jLabel12.setText(Found at:);javax.swing.GroupLayoutlayout=new j
25、avax.swing.GroupLayout(getContentPane();getContentPane().setLayout(layout); layout.setHorizontalGroup(layoreateParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(layoreateSequentialGroup().addContainerGap().addGroup(layoreateParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING).ad
26、dGroup(layoreateSequentialGroup().addGroup(layoreateParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)ponent(jLabel9) ponent(jLabel8) ponent(jLabel6) ponent(jLabel5) ponent(jLabel4) ponent(jLabel7,javax.swing.GroupLayout.PREFERRED_SIZE,416, javax.swing.GroupLayout.PREFERRED_SIZE)ponent(jLabel3
27、) ponent(jLabel2,javax.swing.GroupLayout.PREFERRED_SIZE,183, javax.swing.GroupLayout.PREFERRED_SIZE).addPreferredGap(javax.swiponentPlacem ent.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE).addGroup(layoreateParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)ponent(jLabel1,java
28、x.swing.GroupLayout.PREFERRED_SIZE,226, javax.swing.GroupLayout.PREFERRED_SIZE)ponent(jScrollPane1,javax.swing.GroupLayout.PREFERRED_SIZE,259, javax.swing.GroupLayout.PREFERRED_SIZE)ponent(jLabel12).addGap(18, 18, 18).addGroup(layoreateSequentialGroup().addGroup(layoreateParallelGroup(javax.swing.Gr
29、oupLayout.Alignment.LEADING)ponent(jLabel10).addGroup(layoreateSequentialGroup()ponent(jLabel11).addGap(18, 18, 18).addGroup(layoreateParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)ponent(jTextField1) ponent(jTextField2,javax.swing.GroupLayout.DEFAULT_SIZE, 108, Short.MAX_VALUE).addG
30、ap(18, 18, 18).addGroup(layoreateParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)ponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE,javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)ponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE,javax.swing.GroupLayout.DEFAULT_SIZE, Shor
31、t.MAX_VALUE).addPreferredGap(javax.swiponentPlacem ent.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE).addGroup(layoreateParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false).addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layoreateSequentialGroup()ponent(jLabel14, jav
32、ax.swing.GroupLayout.DEFAULT_SIZE,javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE).addPreferredGap(javax.swiponentPlacement.RELATED)ponent(jButton3,javax.swing.GroupLayout.PREFERRED_SIZE,72, javax.swing.GroupLayout.PREFERRED_SIZE).addContainerGap().addGroup(javax.swing.GroupLayout.Alignment.TR
33、AILING, layoreateSequentialGroup()ponent(jLabel13,javax.swing.GroupLayout.PREFERRED_SIZE,169, javax.swing.GroupLayout.PREFERRED_SIZE).addGap(83, 83, 83);layout.setVerticalGroup(layoreateParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(layoreateSequentialGroup().addGap(18, 18, 18).ad
34、dGroup(layoreateParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)ponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE,26, javax.swing.GroupLayout.PREFERRED_SIZE)ponent(jLabel1).addGap(5, 5, 5).addGroup(layoreateParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(layoreateSequ
35、entialGroup() ponent(jLabel3).addGap(13, 13, 13)ponent(jLabel4).addPreferredGap(javax.swiponentPlacement.UNRELATED)ponent(jLabel5).addPreferredGap(javax.swiponentPlacement.UNRELATED)ponent(jLabel6).addPreferredGap(javax.swiponentPlacement.UNRELATED)ponent(jLabel7).addPreferredGap(javax.swiponentPlac
36、ement.UNRELATED)ponent(jLabel8).addPreferredGap(javax.swiponentPlacement.UNRELATED)ponent(jLabel9) ponent(jScrollPane1,javax.swing.GroupLayout.PREFERRED_SIZE,225, javax.swing.GroupLayout.PREFERRED_SIZE).addPreferredGap(javax.swiponentPlacement.UNRELATED)ponent(jLabel12).addPreferredGap(javax.swipone
37、ntPlacement.RELATED).addGroup(layoreateParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(layoreateParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)ponent(jLabel10) ponent(jTextField1,javax.swing.GroupLayout.PREFERRED_SIZE,javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.Grou
38、pLayout.PREFERRED_SIZE)ponent(jButton1) ponent(jLabel13,javax.swing.GroupLayout.PREFERRED_SIZE,23, javax.swing.GroupLayout.PREFERRED_SIZE).addGap(16, 16, 16).addGroup(layoreateParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)ponent(jLabel14, javax.swing.GroupLayout.DEFAULT_SIZE,javax.s
39、wing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE).addGroup(layoreateParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)ponent(jLabel11) ponent(jTextField2,javax.swing.GroupLayout.PREFERRED_SIZE,javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)ponent(jButton2) ponent(j
40、Button3).addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE,Short.MAX_VALUE);pack(); setLocationRelativeTo(null);/ private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) / TODO add your handling code here: System.exit(0);private void jButton1ActionPerformed(java.awt.event.ActionEvent
41、 evt) / TODO add your handling code here:tryjTextPane2.setText(segarse(jTextField1.getText(); jTextField2.requestFocus(); catch(Exception e)JOptionPane.showMessageDialog(null, Please enter values betn 1 and 7,Display Error,JOptionPane.INFORMATION_MESSAGE);jTextField1.requestFocus();private void jBut
42、ton2ActionPerformed(java.awt.event.ActionEvent evt) / TODO add your handling code here:if(jTextPane2.getText().equals()JOptionPane.showMessageDialog(null, Please select a text,Search string,JOptionPane.INFORMATION_MESSAGE);jTextField1.requestFocus();else if(jTextField2.getText().equals()JOptionPane.
43、showMessageDialog(null, Please input a string,Search string,JOptionPane.INFORMATION_MESSAGE);jTextField2.requestFocus();else if(jTextPane2.getText().indexOf(jTextField2.getText()=-1)JOptionPane.showMessageDialog(null,nostringmatches,Search string,JOptionPane.INFORMATION_MESSAGE);jTextField2.requestF
44、ocus();elseif(JOptionPane.showConfirmDialog(null, The number of occurenof+jTextField2.getText()+is +count(jTextPane2.getText(),jTextField2.getText()+nSearchthesametext?,Searchstring, JOptionPane.YES_NO_OPTION)=0)jLabel13.setText(Occuren:+1+iton: +jTextPane2.getText().indexOf(jTextField2.getText();if
45、(coun !=1)jLabel14.setText(Occuren:+coun+iton: +jTextPane2.getText().lastIndexOf(jTextField2.getText();jTextField2.requestFocus(); jTextField2.setSelectionStart(0); jTextField2.setSelectionEnd(jTextField2.getText().length();elsejTextField2.setText(null);jTextField1.setText(null); jTextPane2.setText(
46、null); jLabel14.setText(null); jTextField1.requestFocus();coun=0;/* param args thed line arguments*/public sic void main(String args) /* Set the Nimbus look and feel */* If Nimbus (roduced in Java SE 6) is not available, stay with the default lookand feel.*Fordetailssee HYPERLINK http:/d/ http:/d/javase/tutorial/uiswing/lookandfeel/plaf.html*/ try for(javax.swing.UIManager.LookAndFeelInfoinfo: javax.swing.UIManager.getInstalledLookAndFeels() if (Nimbus.equals(info.getName() javax.swing.UIManager.setLookAndFeel(info.getClaame(); break; catch (ClaotFoundExceptio
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025年度生物制藥企業(yè)存貨質(zhì)押貸款合同3篇
- 2025年度舞臺(tái)租賃服務(wù)合同下載3篇
- 2025年度大型商場(chǎng)DJ現(xiàn)場(chǎng)表演及音響租賃合同2篇
- 二零二五版危險(xiǎn)品倉儲(chǔ)安全協(xié)議合同3篇
- 2024聯(lián)合研發(fā)合同3篇帶眉腳
- 2025年度夾板加工及銷售一體化合同范本4篇
- 二零二五版銀行存款賬戶資金調(diào)撥與監(jiān)管合同3篇
- 2025年新型投影顯示屏銷售合同3篇
- 二零二五年度玩具OEM委托生產(chǎn)合同示范文本3篇
- 二零二五年度按摩養(yǎng)生館安全管理與應(yīng)急預(yù)案合同3篇
- 2025年經(jīng)濟(jì)形勢(shì)會(huì)議講話報(bào)告
- 北師大版小學(xué)三年級(jí)上冊(cè)數(shù)學(xué)第五單元《周長(zhǎng)》測(cè)試卷(含答案)
- 國家安全責(zé)任制落實(shí)情況報(bào)告3篇
- 2024年度順豐快遞冷鏈物流服務(wù)合同3篇
- 六年級(jí)下冊(cè)【默寫表】(牛津上海版、深圳版)(漢譯英)
- 合同簽訂培訓(xùn)
- 新修訂《保密法》知識(shí)考試題及答案
- 電工基礎(chǔ)知識(shí)培訓(xùn)課程
- 鐵路基礎(chǔ)知識(shí)題庫單選題100道及答案解析
- 金融AI:顛覆與重塑-深化理解AI在金融行業(yè)的實(shí)踐與挑戰(zhàn)
- 住宅樓安全性檢測(cè)鑒定方案
評(píng)論
0/150
提交評(píng)論