數(shù)據(jù)結(jié)構(gòu)課程設(shè)計(jì)報(bào)告簡易英漢詞典系統(tǒng)
《數(shù)據(jù)結(jié)構(gòu)課程設(shè)計(jì)報(bào)告簡易英漢詞典系統(tǒng)》由會員分享,可在線閱讀,更多相關(guān)《數(shù)據(jù)結(jié)構(gòu)課程設(shè)計(jì)報(bào)告簡易英漢詞典系統(tǒng)(42頁珍藏版)》請?jiān)谘b配圖網(wǎng)上搜索。
1、廣西大學(xué) 課程設(shè)計(jì)報(bào)告 課程: 《數(shù)據(jù)結(jié)構(gòu)》 題目:簡易英漢詞典系統(tǒng) 學(xué) 院:______計(jì)算機(jī)與電子信息學(xué)院_ 專 業(yè):______計(jì)網(wǎng)類___________ 班 級:______計(jì)網(wǎng)071_____ ___ _ 學(xué) 號: 0 學(xué)生姓名: 指導(dǎo)教師:__ ________ 二〇〇九 年 四 月 一、實(shí)驗(yàn)?zāi)康暮鸵? 【實(shí)驗(yàn)?zāi)康摹吭O(shè)計(jì)一個(gè)簡易英漢詞典系統(tǒng),實(shí)現(xiàn)基本的單詞檢索功能,即輸入英文單詞則系統(tǒng)輸出其漢語,反之亦然;并能夠進(jìn)行基本的詞典維護(hù)操作,包括
2、插入和刪除,要求按英語的詞典順序排列單詞。 【設(shè)計(jì)要求】 (1)使用圖形化界面。 (2)建立英語詞匯表,輸入為小寫字母時(shí)為合法輸入。 (3)每個(gè)詞條應(yīng)包含單詞的英語形式、漢語釋義、發(fā)音等基本信息。 二、設(shè)計(jì)概要: 1、根據(jù)實(shí)驗(yàn)要求,與及所了解的數(shù)據(jù)類型相關(guān)知識,定義了如下數(shù)據(jù)類型: 鏈接數(shù)據(jù)庫聲明的變量: Connection connection = null; Statement statement = null; ResultSet Result = null; 聲明全局變量: String newWord, pronunciations, indexWord="
3、", deleteWord, searchEnglish, searchChinese,isSound; 它們分別是:新增單詞、新單詞音標(biāo)、引擎詞、刪除詞、查找的英文、查找的漢語、判斷音頻是否存在。 2、實(shí)驗(yàn)功能所定義的各種按鈕、文本框、選擇框和列表框: 取消刪除功能按鈕: JButton deleteCancelButton = new JButton(); 英漢互譯面板上的發(fā)音按鈕: JButton sound = new JButton(); 瀏覽詞庫面板上的發(fā)音按鈕: JButton scanSoundButton = new JButton(); 添加單詞的按鈕:
4、 JButton addOkJButton = new JButton(); 取消添加功能的按鈕: JButton addCancelButton = new JButton(); 刪除詞庫單詞信息按鈕: JButton deleteOkButton = new JButton(); 瀏覽詞庫按鈕: JButton scanButton = new JButton(); 要查找的英文或漢語的文本框輸入框: JTextField inputSearchWord = new JTextField(); 新增單詞文本輸入框: JTextField inputNewWord = n
5、ew JTextField(); 新增單詞音標(biāo)輸入框: JTextField pronunciation = new JTextField(); 新增單詞釋義輸入框: JTextField newWordChinese = new JTextField(); 新增單詞過去式輸入框: JTextField newWordPreterite = new JTextField(); 新增單詞現(xiàn)在進(jìn)行時(shí)態(tài)輸入框: JTextField newWordModernism = new JTextField(); 要?jiǎng)h除的單詞輸入框: JTextField inputDeleteWord
6、 = new JTextField(); 新增單詞詞性復(fù)選框: JComboBox newWordClass = new JComboBox(); 列出要查找的詞的記錄信息的多行文本框: TextArea outputSearchEnglish = new TextArea(); 列出要?jiǎng)h除的單詞的記錄信息的多行文本框: TextArea deleteWordChinese = new TextArea(); 列出瀏覽時(shí)需瀏覽單詞信息的多行文本框: TextArea scanOutput = new TextArea(); DefaultListModel model =
7、new DefaultListModel(); 列出所查找的英文或漢語對應(yīng)的單詞的列表框: JList listSearchEnglish = new JList(model); 列出備選英標(biāo)的列表框: JList pronunciationJList = new JList(listItem); 列出可能且可以被刪除的單詞的列表框: JList deleteJList = new JList(model); 列出詞庫所有單詞的列表框: JList scanWordJList = new JList(model); 3、實(shí)現(xiàn)功能所定義的各種函數(shù): 1)pub
8、lic static String Return(String str) 將數(shù)據(jù)庫里的單詞的音標(biāo)進(jìn)行還原。因?yàn)橛行┮魳?biāo)不能正確存入數(shù)據(jù)庫,只能以其它字符代替,讀取時(shí)再還原。 2)public void Play(String word) 播放單詞word的音頻。 3)public void inputSearch_caretUpdate(CaretEvent e) 當(dāng)inputSearch(注:要查找的詞)輸入框值改變時(shí),listSearchEnglish(注:列出查找結(jié)果)列表框和outputSearchEnglish(注:寫出單詞信息)文本輸出框被清空,取
9、inputSearch輸入框值賦給indexWord,如果indexWord不為空,連接數(shù)據(jù)庫;再判斷要查找的是英語,還是漢語,根據(jù)判斷結(jié)果進(jìn)行查找,并將結(jié)果集按升序排列,輸出到listSearchEnglish列表框 4)public void listSearchEnglish_mouseClicked(MouseEvent me) 當(dāng)鼠標(biāo)單擊listSearchEnglish列表框時(shí),取所選選項(xiàng)的值賦給變量searchEnglish,去掉其兩端空格,outputSearchEnglish文本輸出框被清空,發(fā)音按鈕變成灰白色,從數(shù)據(jù)庫讀取要查找的單詞,將其音標(biāo)進(jìn)行還原,將單詞信
10、息輸出到outputSearchEnglish文本框,如果可以發(fā)音,發(fā)音按鈕變紅色,否則indexWord被賦給空值 5)public void sound_actionPerformed(ActionEvent e) 如果查找單詞有音頻且查找詞不為空,則可發(fā)音,否則按鈕變?yōu)榛野咨? 6)public void inputNewWord_caretUpdate(CaretEvent e) 一旦輸入的新單詞字母不是小寫字母或空格時(shí),彈出提示框 7)public void pronunciation_caretUpdate(CaretEvent e) 對輸入的音標(biāo)進(jìn)行處
11、理,因?yàn)樽址鸤u0254、\u01DD、‘、\u00E6 存入數(shù)據(jù)庫時(shí)會變成?或出錯(cuò),所以用0、1、2、4分別代替他們,讀取時(shí)通過調(diào)用Return函數(shù)還原,且將音標(biāo)兩端和中間空格去掉 8)public void pronunciationJList_mouseClicked(MouseEvent me) 當(dāng)在音標(biāo)選項(xiàng)列表單擊鼠標(biāo)選擇音標(biāo)時(shí),將所選音標(biāo)輸入音標(biāo)輸入框 9)public void addOkJButton_actionPerformed(ActionEvent e) 讀取未讀取的輸入框的字符,去掉單詞、注釋各自兩端空格,并將去掉它們各自中間兩個(gè)或兩個(gè)以上的空格
12、留一個(gè)空格,接著在數(shù)據(jù)庫查找添加的單詞是否已存在,若已存在,彈出提示框,不能再添加,否則向數(shù)據(jù)庫添加新單詞信息,最后清空所有輸入框 10)public void addCancelButton_actionPerformed(ActionEvent e) 點(diǎn)擊添加取消按鈕,新增面板所有輸入框被清空 11)public void inputDeleteWord_caretUpdate(CaretEvent e) 當(dāng)inputDeleteWord輸入框值改變時(shí),清空deleteJList列表框,讀取inputDeleteWord輸入框值賦給變量deleteWord,按模糊查找法查找以del
13、eteWord的值開頭的所有單詞,按升序排列,并將他們輸出到deleteJList列表框 12)public void deleteJList_mouseClicked(MouseEvent me) 當(dāng)在deleteJList列表框單擊選項(xiàng)時(shí),讀取選項(xiàng)值賦給deleteWord變量,并去掉其兩端空格,向inputDeleteWord輸入框輸入deleteWord變量值,接著從數(shù)據(jù)庫讀取要?jiǎng)h除的單詞的信息,如某屬性不為空,將其輸入到eleteWordChinese多行文本框 13)public void deleteOkButton_actionPerformed(ActionEv
14、ent e) 單擊刪除按鈕,如果輸入框?yàn)榭?,則彈出提示框,否則從數(shù)據(jù)庫中刪除要?jiǎng)h除的單詞的所有記錄 14)Public void deleteCancelButton_actionPerformed(ActionEvent e) 單擊取消按鈕,inputDeleteWord、deleteWordChinese都被清空 15)public void scanButton_actionPerformed(ActionEvent e) 單擊瀏覽按鈕,scanWordJList列表框被清空,然后從數(shù)據(jù)庫讀取所有單詞,按升序排列;然后將所得結(jié)果集輸入到scanWordJLi
15、st列表框 16)public void scanWordJList_mouseClicked(MouseEvent me) 當(dāng)鼠標(biāo)單擊scanWordJList列表框時(shí),取所選選項(xiàng)的值賦給變量ndexWord,去掉其兩端空格,scanOutput文本框被清空,發(fā)音按鈕變成灰白色,從數(shù)據(jù)庫讀取要查找的單詞(indexWord的值),將其音標(biāo)進(jìn)行還原,將單詞信息輸出到scanOutput文本框,如果可以發(fā)音,發(fā)音按鈕變紅色,否則indexWord被賦給空值 17)public void soundButton_actionPerformed(ActionEvent e)
16、如果查找單詞有音頻且查找詞不為空,則可發(fā)音,否則按鈕變?yōu)榛野咨? 三、程序模塊流程圖 開始 英漢互譯 是否輸入? 是否是英文 查找英文 查找漢譯 列出找到的單詞 單擊? 列出單詞信息 清空列表框和 多行文本框 是否找到 顯錯(cuò)錯(cuò)誤 添加詞匯 輸入單詞? 是否合法 彈出提示信息 是否選擇 備選音標(biāo) 寫入音標(biāo)輸入框 單擊添加按鈕 輸入單詞? 彈出警告 成功? 顯示錯(cuò)誤 提示成功 單擊取消按鈕 清空所有輸入框 是否已存在 保存所有信息 不能添加 可否發(fā)音 結(jié)束 發(fā)音按鈕變紅 結(jié)束 Y N Y Y N Y Y
17、N N Y N Y Y Y N Y 單擊發(fā)音 刪除詞匯 輸入? 模糊查找 是否匹配 列出找到的單詞 單擊選擇? 列出單詞信息并把 單詞寫入輸入框 點(diǎn)擊刪除按鈕 是否有單詞 彈出提示信息 刪除該單詞 點(diǎn)擊取消按鈕 清空各框內(nèi)內(nèi)容 瀏覽詞庫 按升序列出詞庫單詞 是否被單擊 列出單詞信息 可否發(fā)音 發(fā)音按鈕變紅 單擊瀏覽按鈕 發(fā)音按鈕是否紅 結(jié)束 結(jié)束 Y N Y N Y Y N N Y Y N Y 單擊發(fā)音 四、具體程序設(shè)計(jì)代碼 package languanhengdictionary;
18、 import java.awt.BorderLayout; import java.sql.*; import java.io.File; import java.io.IOException; import javax.sound.sampled.AudioSystem; import javax.sound.sampled.LineUnavailableException; import javax.sound.sampled.UnsupportedAudioFileException; import javax.sound.sampled.AudioInputStream
19、; import javax.sound.sampled.AudioFormat; import javax.sound.sampled.SourceDataLine; import javax.sound.sampled.DataLine; import javax.swing.JFrame; import javax.swing.JTabbedPane; import java.awt.Rectangle; import javax.swing.JPanel; import javax.swing.JLabel; import java.awt.Font; import
20、 java.awt.Color; import javax.swing.JTextField; import javax.swing.JButton; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JTextArea; import java.awt.TextArea; import java.awt.Dimension; import java.awt.Choice; import java.awt.event.ItemEvent; i
21、mport java.awt.event.ItemListener; import java.awt.Checkbox; import javax.swing.JComboBox; import javax.swing.JList; import javax.swing.JOptionPane; import java.awt.*; import javax.swing.JScrollPane; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import javax.swing.De
22、faultListModel; import java.awt.event.HierarchyListener; import java.awt.event.HierarchyEvent; import javax.swing.event.CaretListener; import javax.swing.event.CaretEvent; import javax.swing.border.TitledBorder; import javax.swing.UIManager; import javax.swing.BorderFactory; import java.io.*
23、; import javax.swing.border.Border; public class englishFrame extends JFrame { Connection connection = null; Statement statement = null; ResultSet Result = null; public englishFrame() { try { jbInit(); } catch (Exception exception) {
24、 exception.printStackTrace(); } } private void jbInit() throws Exception { getContentPane().setLayout(null); mainJP.setFont(new java.awt.Font("宋體", Font.PLAIN, 25)); mainJP.setForeground(new Color(0, 242, 118)); mainJP.setBorder(titledBorder1
25、); mainJP.setToolTipText(""); mainJP.setBounds(new Rectangle(2, 51, 543, 295)); searchEnglishOrChineseJP.setLayout(null); addWordJP.setLayout(null); deleteJP.setLayout(null); scanStock.setLayout(null); jLabel2.setFont(new java.awt.Font("
26、宋體", Font.PLAIN, 20)); jLabel2.setForeground(new Color(0, 180, 62)); jLabel2.setText("輸入引擎詞"); jLabel2.setBounds(new Rectangle(8, 16, 106, 43)); inputSearchWord.setFont(new java.awt.Font("宋體", Font.PLAIN, 20)); jScrollPane1.setBounds(new Rectangle(118, 60
27、, 145, 178)); listSearchEnglish.setFont(new java.awt.Font("宋體", Font.PLAIN, 20)); listSearchEnglish.setForeground(Color.blue); listSearchEnglish.setSelectionBackground(new Color(51, 255, 104)); outputSearchEnglish.setFont(new java.awt.Font("宋體", Font.PLAIN, 20));
28、 outputSearchEnglish.setBounds(new Rectangle(267, 59, 227, 179)); jLabel4.setFont(new java.awt.Font("宋體", Font.PLAIN, 25)); jLabel4.setForeground(new Color(0, 180, 0)); jLabel4.setText("新單詞"); jLabel4.setBounds(new Rectangle(6, 9, 81, 34)); inputN
29、ewWord.setFont(new java.awt.Font("宋體", Font.PLAIN, 20)); inputNewWord.setBounds(new Rectangle(93, 11, 155, 34)); jLabel5.setFont(new java.awt.Font("宋體", Font.PLAIN, 25)); jLabel5.setForeground(new Color(0, 159, 14)); jLabel5.setText("發(fā) 音"); jLabel5.setBou
30、nds(new Rectangle(6, 118, 76, 33)); jLabel6.setFont(new java.awt.Font("宋體", Font.PLAIN, 25)); jLabel6.setForeground(new Color(0, 173, 55)); jLabel6.setText("詞 性"); jLabel6.setBounds(new Rectangle(7, 63, 81, 35)); pronunciation.setFont(new java.awt.Font("A
31、rial Unicode MS", Font.PLAIN,20)); pronunciation.setBounds(new Rectangle(92, 119, 154, 36)); newWordClass.setBounds(new Rectangle(95, 62, 154, 36)); jScrollPane3.setBounds(new Rectangle(93, 156, 154, 79)); jLabel7.setFont(new java.awt.Font("宋體", Font.PLAIN, 25));
32、 jLabel7.setForeground(new Color(0, 208, 48)); jLabel7.setText("注 釋"); jLabel7.setBounds(new Rectangle(267, 9, 72, 34)); newWordChinese.setFont(new java.awt.Font("宋體", Font.PLAIN, 20)); newWordChinese.setBounds(new Rectangle(354, 11, 164, 34)); jL
33、abel8.setFont(new java.awt.Font("宋體", Font.PLAIN, 25)); jLabel8.setForeground(new Color(0, 187, 0)); jLabel8.setToolTipText(""); jLabel8.setText("過去式"); jLabel8.setBounds(new Rectangle(264, 62, 77, 32)); newWordPreterite.setFont(new java.awt.Font("宋體", Fo
34、nt.PLAIN, 20)); newWordPreterite.setBounds(new Rectangle(353, 61, 164, 36)); jLabel9.setFont(new java.awt.Font("宋體", Font.PLAIN, 25)); jLabel9.setForeground(new Color(0, 187, 21)); jLabel9.setText("現(xiàn)代式"); jLabel9.setBounds(new Rectangle(263, 122, 75, 31))
35、; newWordModernism.setFont(new java.awt.Font("宋體", Font.PLAIN, 20)); newWordModernism.setBounds(new Rectangle(353, 121, 163, 37)); addOkJButton.setBounds(new Rectangle(261, 179, 83, 40)); addOkJButton.setFont(new java.awt.Font("宋體", Font.PLAIN, 20)); addO
36、kJButton.setText("確定"); addCancelButton.setBounds(new Rectangle(407, 182, 83, 37)); addCancelButton.setFont(new java.awt.Font("宋體", Font.PLAIN, 20)); addCancelButton.setText("取消"); jLabel10.setFont(new java.awt.Font("宋體", Font.PLAIN, 25)); jLabel10.setFor
37、eground(new Color(0, 187, 62)); jLabel10.setText("輸入詞匯"); jLabel10.setBounds(new Rectangle(6, 33, 107, 34)); inputDeleteWord.setFont(new java.awt.Font("宋體", Font.PLAIN, 20)); inputDeleteWord.setBounds(new Rectangle(112, 31, 186, 37)); deleteWordChinese.se
38、tFont(new java.awt.Font("宋體", Font.PLAIN, 20)); deleteWordChinese.setBounds(new Rectangle(112, 69, 185, 168)); jScrollPane4.setBounds(new Rectangle(297, 31, 139, 206)); deleteJList.setFont(new java.awt.Font("宋體", Font.PLAIN, 20)); deleteJList.setForeground(Color.b
39、lue); deleteJList.setSelectionBackground(new Color(51, 255, 0)); deleteOkButton.setBounds(new Rectangle(437, 31, 83, 38)); deleteOkButton.setFont(new java.awt.Font("楷體", Font.PLAIN, 20)); deleteOkButton.setForeground(new Color(0, 187, 55)); deleteOkButton
40、.setText("刪除"); scanButton.setForeground(new Color(0, 214, 0)); scanButton.setText("瀏覽"); jScrollPane5.setBounds(new Rectangle(25, 59, 146, 178)); scanOutput.setColumns(5); scanOutput.setFont(new java.awt.Font("宋體", Font.PLAIN, 20)); scanOutput.s
41、etBounds(new Rectangle(188, 60, 315, 177)); scanWordJList.setFont(new java.awt.Font("宋體", Font.PLAIN, 20)); scanWordJList.setForeground(Color.blue); scanWordJList.setSelectionBackground(Color.green); jLabel11.setFont(new java.awt.Font("楷體", Font.PLAIN, 45));
42、 jLabel11.setForeground(new Color(0, 255, 138)); jLabel11.setText("歡迎訪問詞庫"); jLabel11.setBounds(new Rectangle(197, 8, 287, 40)); deleteCancelButton.setBounds(new Rectangle(437, 96, 83, 34)); deleteCancelButton.setFont(new java.awt.Font("楷體", Font.PLAIN, 20));
43、 deleteCancelButton.setForeground(new Color(0, 221, 42)); deleteCancelButton.setToolTipText(""); deleteCancelButton.setText("取消"); pronunciationJList.setSelectionBackground(new Color(51, 255, 125)); sound.setBounds(new Rectangle(420, 24, 74, 33));
44、sound.setFont(new java.awt.Font("宋體", Font.PLAIN, 20)); sound.setToolTipText(""); sound.setText("發(fā)音"); inputSearchWord.setBounds(new Rectangle(117, 24, 302, 35)); scanButton.setBackground(new Color(240, 240, 240)); scanButton.setFont(new java.awt.Font("宋體
45、", Font.PLAIN, 20)); scanSoundButton.setBounds(new Rectangle(110, 15, 79, 37)); scanSoundButton.setFont(new java.awt.Font("宋體", Font.PLAIN, 20)); scanSoundButton.setText("發(fā)音"); scanButton.setBounds(new Rectangle(27, 14, 78, 38)); this.getContentPane().add
46、(mainJP); searchEnglishOrChineseJP.add(jLabel2); searchEnglishOrChineseJP.add(jScrollPane1); searchEnglishOrChineseJP.add(outputSearchEnglish); searchEnglishOrChineseJP.add(inputSearchWord); searchEnglishOrChineseJP.add(sound); jScrollPane1.getVi
47、ewport().add(listSearchEnglish); mainJP.add(searchEnglishOrChineseJP, "英漢互譯"); mainJP.add(addWordJP, "添加詞匯"); addWordJP.add(jLabel4); addWordJP.add(inputNewWord); addWordJP.add(jLabel7); addWordJP.add(newWordChinese); addWordJP.add(newWo
48、rdClass); addWordJP.add(jLabel6); addWordJP.add(newWordPreterite); addWordJP.add(jLabel5); addWordJP.add(jLabel9); addWordJP.add(newWordModernism); addWordJP.add(jScrollPane3); addWordJP.add(pronunciation); addWordJP.add(addOkJB
49、utton); addWordJP.add(addCancelButton); addWordJP.add(jLabel8); jScrollPane3.getViewport().add(pronunciationJList); mainJP.add(deleteJP, "刪除詞匯"); deleteJP.add(jLabel10); deleteJP.add(inputDeleteWord); deleteJP.add(deleteWordChinese);
50、 deleteJP.add(jScrollPane4); deleteJP.add(deleteOkButton); deleteJP.add(deleteCancelButton); jScrollPane4.getViewport().add(deleteJList); mainJP.add(scanStock, "瀏覽詞庫"); scanStock.add(jScrollPane5); jScrollPane5.getViewport().add(scanWordJLis
51、t); scanStock.add(scanButton); scanStock.add(scanOutput); scanStock.add(jLabel11); scanStock.add(scanSoundButton); this.getContentPane().add(jLabel1); jLabel1.setFont(new java.awt.Font("楷體", Font.PLAIN, 45)); jLabel1.setForeground(Color.
52、blue); jLabel1.setText("藍(lán)氏簡易英漢詞典"); jLabel1.setBounds(new Rectangle(107, 5, 374, 47)); newWordClass.addItem("n. 名詞"); newWordClass.addItem("adj. 形容詞"); newWordClass.addItem("adv. 副詞"); newWordClass.addItem("num. 量詞"); newWordClass.addIte
53、m("V. 動詞"); newWordClass.addItem("Vi. 不及物動詞"); newWordClass.addItem("Vt. 及物動詞"); newWordClass.addItem("短語"); pronunciationJList.setLayoutOrientation(pronunciationJList.HORIZONTAL_WRAP); this.setSize(new Dimension(560, 385)); //第一個(gè)參 //為長度,第二個(gè)參數(shù)為高度 //----
54、-------------英漢互譯模塊函數(shù)調(diào)用------------------// //發(fā)音按鈕監(jiān)聽器 sound.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { sound_actionPerformed(e); } }); //查找輸入框監(jiān)聽器 inputSearchWord.addCaretListene
55、r(new CaretListener() { public void caretUpdate(CaretEvent e) { inputSearch_caretUpdate(e); } }); //查找單詞列表監(jiān)聽器 listSearchEnglish.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent e) { l
56、istSearchEnglish_mouseClicked(e); } }); //--------------------添加面板模塊函數(shù)調(diào)----------------// //新單詞輸入框監(jiān)聽器 inputNewWord.addCaretListener(new CaretListener() { public void caretUpdate(CaretEvent e) { inputNewWord_caretUpdate(e);
57、 } }); //新單詞音標(biāo)輸入框監(jiān)聽器 pronunciation.addCaretListener(new CaretListener() { public void caretUpdate(CaretEvent e) { pronunciation_caretUpdate(e); } }); //音標(biāo)選擇列表鼠標(biāo)監(jiān)聽器 pronunciationJList.addMouseListener(new MouseAdap
58、ter() { public void mouseClicked(MouseEvent e) { pronunciationJList_mouseClicked(e); } }); //添加按鈕監(jiān)聽器 addOkJButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { addOkJButton_actio
59、nPerformed(e); } }); // 取消添加單詞按鈕監(jiān)聽器 addCancelButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { addCancelButton_actionPerformed(e); } }); //-------------------刪除模塊函數(shù)調(diào)用-------------------/
60、/ //刪除單詞輸入框監(jiān)聽器 inputDeleteWord.addCaretListener(new CaretListener() { public void caretUpdate(CaretEvent e) { inputDeleteWord_caretUpdate(e); } }); //刪除單詞列表框鼠標(biāo)監(jiān)聽器 deleteJList.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEv
61、ent e) { deleteJList_mouseClicked(e); } }); //刪除按鈕監(jiān)聽器 deleteOkButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { deleteOkButton_actionPerformed(e); } }); //取消刪除按鈕監(jiān)聽器 deleteCancelButton.addAc
62、tionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { deleteCancelButton_actionPerformed(e); } }); //-----------------瀏覽數(shù)據(jù)庫函數(shù)調(diào)用-------------------// //瀏覽詞庫單詞發(fā)音按鈕監(jiān)聽器 scanSoundButton.addActionListener(new ActionListener() {
63、 public void actionPerformed(ActionEvent e) { soundButton_actionPerformed(e); } }); //瀏覽詞庫按鈕監(jiān)聽器 scanButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { scanButton_actionPerformed(e); } }); //瀏覽單詞列表鼠標(biāo)監(jiān)聽器
64、 scanWordJList.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent e) { scanWordJList_mouseClicked(e); } }); } String listItem[] = {"/", "", ",", "b","c", "d", "e","f", "h", "g", "i:", "i", "j", "k"
65、,"l","m", "n",":","p", "r", "s", "t","u", "u:","ju:","v","w", "z", "η", "θ", "з", "ε","\u00F0","\u0259", "\u0259u","\u0254:","\u0254", "∧", "\u00E6", "ɑ", "ɑ:", "ai", "ei", "tr", "dr", "au", "ts", "dz", "d3", "t∫", "∫", }; DefaultListModel model = new DefaultListModel(); JTabbedPa
66、ne mainJP = new JTabbedPane(); JLabel jLabel1 = new JLabel(); JPanel searchEnglishOrChineseJP = new JPanel(); JPanel addWordJP = new JPanel(); JPanel deleteJP = new JPanel(); JPanel scanStock = new JPanel(); JLabel jLabel2 = new JLabel(); JTextField inputSearchWord = new JTextField(); JScrollPane jScrollPane1 = new JScrollPane(); JList listSearchEnglish = new JList(model); TextArea outputSearchEnglish = new TextArea(); JLabel jLabel4 = new
- 溫馨提示:
1: 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
2: 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
3.本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
5. 裝配圖網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。