欢迎来到天天文库
浏览记录
ID:40591510
大小:153.50 KB
页数:10页
时间:2019-08-04
《云大JAVA实验12Lab#12(陆歌浩)》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、云南大学软件学院实验报告课程:Java程序设计实验学期:2012-2013学年第一学期任课教师:专业:学号:序号:姓名:成绩:实验12部署applet和应用程序一、实验目的练习Java中部署applet和应用程序的应用。二、实验内容Program1Purpose:FamiliarizeyourselfwithsomeofJava'sGUIcapabilitiesandeventhandlingandwriteaprogramcontainingthesethings.Program:Createaprogramtododi
2、splaysomethingclosetothefollowing:-----------------------------------
3、InputNumbers
4、
5、-----------------------------
6、
7、
8、
9、
10、<<11、-----------------------------12、13、14、15、--------------------16、17、18、Sortlowtohigh19、20、<<21、--------------------22、23、24、25、--------------26、------27、28、29、Sorthightolow30、31、<<32、--------------------33、34、35、36、37、38、OutputNumbers39、40、-----------------------------41、42、43、44、45、<<46、-----------------------------47、48、49、50、51、52、--------------------53、54、55、ExitProgram56、57、<<58、--------------------59、60、61、10---------------62、--------------------YouwillbeprovidedwithamethodthattakesinaStringandreturnstoyouanarrayofintegers.(Iwillwritethisandmakeitavailabletoyou.)TheStringthatyoupassinistheonetheuserentersinthe"Inputnumbers"textfield.Youwillneedtohaveamethodtosortthearraythatisreturned(63、youcanusebubblesortjustlikeinthelastcoupleoflabs.)Thiswillsortfromlowtohigh.Ifyoudocopyitoutofthebook,justgiveproperattribution.Whenthe"Sortlowtohigh"buttonisclicked,youshouldoutputthesortedintegersinthe"Outputnumbers"textfield.Whenthe"Sorthightolow"buttonisclicke64、d,youshouldoutputthesortedintegersinthe"Outputnumbers"textfield.Theusershouldbeabletochangethenumbersinthe"Inputnumbers"fieldandwhenthebuttonsarepressed,theysortthecurrentnumbersandoutputthemsorted.实验代码:packageedu.ynu.lab12;importjava.awt.*;importjavax.swing.*;pub65、licclassSortTest{publicstaticvoidmain(String[]args){EventQueue.invokeLater(newRunnable(){publicvoidrun(){SortFrameframe=newSortFrame();frame.setLocation(350,180);//frame.setSize(350,380);frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);frame.setVisible(true);}66、});}}packageedu.ynu.lab12;importjavax.swing.*;10importjava.awt.Font;importjava.awt.event.*;importjava.util.regex.Matcher;importjava.util.regex.Pattern;p
11、-----------------------------
12、
13、
14、
15、--------------------
16、
17、
18、Sortlowtohigh
19、
20、<<21、--------------------22、23、24、25、--------------26、------27、28、29、Sorthightolow30、31、<<32、--------------------33、34、35、36、37、38、OutputNumbers39、40、-----------------------------41、42、43、44、45、<<46、-----------------------------47、48、49、50、51、52、--------------------53、54、55、ExitProgram56、57、<<58、--------------------59、60、61、10---------------62、--------------------YouwillbeprovidedwithamethodthattakesinaStringandreturnstoyouanarrayofintegers.(Iwillwritethisandmakeitavailabletoyou.)TheStringthatyoupassinistheonetheuserentersinthe"Inputnumbers"textfield.Youwillneedtohaveamethodtosortthearraythatisreturned(63、youcanusebubblesortjustlikeinthelastcoupleoflabs.)Thiswillsortfromlowtohigh.Ifyoudocopyitoutofthebook,justgiveproperattribution.Whenthe"Sortlowtohigh"buttonisclicked,youshouldoutputthesortedintegersinthe"Outputnumbers"textfield.Whenthe"Sorthightolow"buttonisclicke64、d,youshouldoutputthesortedintegersinthe"Outputnumbers"textfield.Theusershouldbeabletochangethenumbersinthe"Inputnumbers"fieldandwhenthebuttonsarepressed,theysortthecurrentnumbersandoutputthemsorted.实验代码:packageedu.ynu.lab12;importjava.awt.*;importjavax.swing.*;pub65、licclassSortTest{publicstaticvoidmain(String[]args){EventQueue.invokeLater(newRunnable(){publicvoidrun(){SortFrameframe=newSortFrame();frame.setLocation(350,180);//frame.setSize(350,380);frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);frame.setVisible(true);}66、});}}packageedu.ynu.lab12;importjavax.swing.*;10importjava.awt.Font;importjava.awt.event.*;importjava.util.regex.Matcher;importjava.util.regex.Pattern;p
21、--------------------
22、
23、
24、
25、--------------
26、------
27、
28、
29、Sorthightolow
30、
31、<<32、--------------------33、34、35、36、37、38、OutputNumbers39、40、-----------------------------41、42、43、44、45、<<46、-----------------------------47、48、49、50、51、52、--------------------53、54、55、ExitProgram56、57、<<58、--------------------59、60、61、10---------------62、--------------------YouwillbeprovidedwithamethodthattakesinaStringandreturnstoyouanarrayofintegers.(Iwillwritethisandmakeitavailabletoyou.)TheStringthatyoupassinistheonetheuserentersinthe"Inputnumbers"textfield.Youwillneedtohaveamethodtosortthearraythatisreturned(63、youcanusebubblesortjustlikeinthelastcoupleoflabs.)Thiswillsortfromlowtohigh.Ifyoudocopyitoutofthebook,justgiveproperattribution.Whenthe"Sortlowtohigh"buttonisclicked,youshouldoutputthesortedintegersinthe"Outputnumbers"textfield.Whenthe"Sorthightolow"buttonisclicke64、d,youshouldoutputthesortedintegersinthe"Outputnumbers"textfield.Theusershouldbeabletochangethenumbersinthe"Inputnumbers"fieldandwhenthebuttonsarepressed,theysortthecurrentnumbersandoutputthemsorted.实验代码:packageedu.ynu.lab12;importjava.awt.*;importjavax.swing.*;pub65、licclassSortTest{publicstaticvoidmain(String[]args){EventQueue.invokeLater(newRunnable(){publicvoidrun(){SortFrameframe=newSortFrame();frame.setLocation(350,180);//frame.setSize(350,380);frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);frame.setVisible(true);}66、});}}packageedu.ynu.lab12;importjavax.swing.*;10importjava.awt.Font;importjava.awt.event.*;importjava.util.regex.Matcher;importjava.util.regex.Pattern;p
32、--------------------
33、
34、
35、
36、
37、
38、OutputNumbers
39、
40、-----------------------------
41、
42、
43、
44、
45、<<46、-----------------------------47、48、49、50、51、52、--------------------53、54、55、ExitProgram56、57、<<58、--------------------59、60、61、10---------------62、--------------------YouwillbeprovidedwithamethodthattakesinaStringandreturnstoyouanarrayofintegers.(Iwillwritethisandmakeitavailabletoyou.)TheStringthatyoupassinistheonetheuserentersinthe"Inputnumbers"textfield.Youwillneedtohaveamethodtosortthearraythatisreturned(63、youcanusebubblesortjustlikeinthelastcoupleoflabs.)Thiswillsortfromlowtohigh.Ifyoudocopyitoutofthebook,justgiveproperattribution.Whenthe"Sortlowtohigh"buttonisclicked,youshouldoutputthesortedintegersinthe"Outputnumbers"textfield.Whenthe"Sorthightolow"buttonisclicke64、d,youshouldoutputthesortedintegersinthe"Outputnumbers"textfield.Theusershouldbeabletochangethenumbersinthe"Inputnumbers"fieldandwhenthebuttonsarepressed,theysortthecurrentnumbersandoutputthemsorted.实验代码:packageedu.ynu.lab12;importjava.awt.*;importjavax.swing.*;pub65、licclassSortTest{publicstaticvoidmain(String[]args){EventQueue.invokeLater(newRunnable(){publicvoidrun(){SortFrameframe=newSortFrame();frame.setLocation(350,180);//frame.setSize(350,380);frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);frame.setVisible(true);}66、});}}packageedu.ynu.lab12;importjavax.swing.*;10importjava.awt.Font;importjava.awt.event.*;importjava.util.regex.Matcher;importjava.util.regex.Pattern;p
46、-----------------------------
47、
48、
49、
50、
51、
52、--------------------
53、
54、
55、ExitProgram
56、
57、<<58、--------------------59、60、61、10---------------62、--------------------YouwillbeprovidedwithamethodthattakesinaStringandreturnstoyouanarrayofintegers.(Iwillwritethisandmakeitavailabletoyou.)TheStringthatyoupassinistheonetheuserentersinthe"Inputnumbers"textfield.Youwillneedtohaveamethodtosortthearraythatisreturned(63、youcanusebubblesortjustlikeinthelastcoupleoflabs.)Thiswillsortfromlowtohigh.Ifyoudocopyitoutofthebook,justgiveproperattribution.Whenthe"Sortlowtohigh"buttonisclicked,youshouldoutputthesortedintegersinthe"Outputnumbers"textfield.Whenthe"Sorthightolow"buttonisclicke64、d,youshouldoutputthesortedintegersinthe"Outputnumbers"textfield.Theusershouldbeabletochangethenumbersinthe"Inputnumbers"fieldandwhenthebuttonsarepressed,theysortthecurrentnumbersandoutputthemsorted.实验代码:packageedu.ynu.lab12;importjava.awt.*;importjavax.swing.*;pub65、licclassSortTest{publicstaticvoidmain(String[]args){EventQueue.invokeLater(newRunnable(){publicvoidrun(){SortFrameframe=newSortFrame();frame.setLocation(350,180);//frame.setSize(350,380);frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);frame.setVisible(true);}66、});}}packageedu.ynu.lab12;importjavax.swing.*;10importjava.awt.Font;importjava.awt.event.*;importjava.util.regex.Matcher;importjava.util.regex.Pattern;p
58、--------------------
59、
60、
61、10---------------
62、--------------------YouwillbeprovidedwithamethodthattakesinaStringandreturnstoyouanarrayofintegers.(Iwillwritethisandmakeitavailabletoyou.)TheStringthatyoupassinistheonetheuserentersinthe"Inputnumbers"textfield.Youwillneedtohaveamethodtosortthearraythatisreturned(
63、youcanusebubblesortjustlikeinthelastcoupleoflabs.)Thiswillsortfromlowtohigh.Ifyoudocopyitoutofthebook,justgiveproperattribution.Whenthe"Sortlowtohigh"buttonisclicked,youshouldoutputthesortedintegersinthe"Outputnumbers"textfield.Whenthe"Sorthightolow"buttonisclicke
64、d,youshouldoutputthesortedintegersinthe"Outputnumbers"textfield.Theusershouldbeabletochangethenumbersinthe"Inputnumbers"fieldandwhenthebuttonsarepressed,theysortthecurrentnumbersandoutputthemsorted.实验代码:packageedu.ynu.lab12;importjava.awt.*;importjavax.swing.*;pub
65、licclassSortTest{publicstaticvoidmain(String[]args){EventQueue.invokeLater(newRunnable(){publicvoidrun(){SortFrameframe=newSortFrame();frame.setLocation(350,180);//frame.setSize(350,380);frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);frame.setVisible(true);}
66、});}}packageedu.ynu.lab12;importjavax.swing.*;10importjava.awt.Font;importjava.awt.event.*;importjava.util.regex.Matcher;importjava.util.regex.Pattern;p
此文档下载收益归作者所有