freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

java課程設(shè)計(jì)報(bào)告_電子鐘日歷記事本(參考版)

2024-09-02 12:18本頁(yè)面
  

【正文】 。 (mk/2,nk/2,k,k)。 } else{ int k=7。 ()。 int n=(int)pointSY[i]。i60。 initPoint()。 //坐標(biāo)平移 pointHY[i]=pointHY[i]+height/2。 //坐標(biāo)平移 pointMY[i]=pointMY[i]+height/2。 //坐標(biāo)平移 pointSY[i]=pointSY[i]+height/2。i60。 pointHY[i+1]=pointHY[i]*(angle)+pointHX[i]*(angle)。 pointMY[i+1]=pointMY[i]*(angle)+pointMX[i]*(angle)。 pointSY[i+1]=pointSY[i]*(angle)+pointSX[i]*(angle)。i59。 double angle=6*。 pointHX[0]=0。 pointMX[0]=0。 pointSX[0]=0。 //秒針開始計(jì)時(shí) } private void initPoint(){ width=getBounds().width。 hourLine=new (0,0,0,0)。 secondLine=new (0,0,0,0)。 initPoint()。 日歷記事本 38 double [] pointSX=new double[60], //用來表示秒針端點(diǎn)坐標(biāo)的數(shù)組 pointSY=new double[60], pointMX=new double[60], //用來 表示分針端點(diǎn)坐標(biāo)的數(shù)組 pointMY=new double[60], pointHX=new double[60], //用來表示時(shí)針端點(diǎn)坐標(biāo)的數(shù)組 pointHY=new double[60]。 Line2D secondLine,minuteLine,hourLine。 secondTime。 import .*。 import .*。 import .*。 import .*。),既 muniteLine改變端點(diǎn)坐標(biāo);每隔 12 分鐘,讓時(shí)針前進(jìn)一個(gè)刻度,既 hourLine 改變端點(diǎn)坐標(biāo) [6]。計(jì)時(shí)器發(fā)生的振鈴時(shí)件是 ActionEvent 類型時(shí)件,當(dāng)振鈴時(shí)間發(fā)生時(shí),監(jiān)視器就會(huì)監(jiān)視到這個(gè)事件,監(jiān)視器就會(huì)回調(diào)用 ActionListener 接口中的 actionPerformed(ActionEvent)方法,該方法所做的操作是:每隔 1 秒鐘,讓秒針前進(jìn)一個(gè)刻度,既 secondLine 改變端點(diǎn)坐標(biāo);每隔 1 分鐘,讓分針前進(jìn)一個(gè)刻度(表盤一周為 360176。 } } 時(shí)鐘 模塊設(shè)計(jì) 效果圖 類的主要成員變量和方法 ( 1) 成員變量 1) date 是 Date 對(duì)像,負(fù)責(zé)封裝本地時(shí)間 2) secondTime 是 包中 Timer 類創(chuàng)建的計(jì)時(shí) 3) hour, minute 和 second 是 int 型數(shù)據(jù),分別飛“小時(shí)”,“分鐘”和“秒” 4) secondLine, minuteLine 和 hourLine 是 Lint2D 對(duì)象,分別負(fù)責(zé)繪制“時(shí)針”,“分針”,“秒針” Java 語(yǔ)言與面向?qū)ο蠹夹g(shù)課程設(shè)計(jì) 37 5) pointSX, pointSY 是 double 型數(shù)組,其單元值用來表示秒針端點(diǎn)的坐標(biāo) 6) pointMX, pointMY 是 double 型數(shù)組,其單元值用來表示分針端點(diǎn)坐標(biāo) 7) pointHX, pointHY 是 double 型數(shù)組,其單元值用來便是時(shí)針端點(diǎn)坐標(biāo) [5] ( 2) 方法 1) Clock()是構(gòu)造方法,用來創(chuàng)建 clock 對(duì)象 2) initPoint()負(fù)責(zé)創(chuàng)建表盤所需要的坐標(biāo)點(diǎn) 3) paintComponent( Graphics)負(fù)責(zé)完成繪制工作 4) actionPerformed( ActionEvent)是接口 ActionListener 中的方法。 int h=getBounds().height。//重繪; } 日歷記事本 36 //重載 paintComponent 方法,覆蓋原來的,供 repaint()調(diào)用; public void paintComponent(Graphics g) { (g)。 try{ image=(().toURL())。 //構(gòu)造方法 public CalendarImage() { tool=getToolkit()。 Image image。 import .*。 } } } 圖像 模塊設(shè)計(jì) 效果圖 類的主要成員變量和方法 ( 1) 成員變量 1) imageFile 是 File 對(duì)象,用來存放圖像文件的引用 2) image 是 Image 對(duì)象 3) tool 是 Tookit 對(duì)象,負(fù)責(zé)創(chuàng)建 image 對(duì)象 Java 語(yǔ)言與面向?qū)ο蠹夹g(shù)課程設(shè)計(jì) 35 ( 2) 方法 1) CalendarImage()是構(gòu)造方法,負(fù)責(zé)創(chuàng)建 calendarImage 對(duì)象 2) setImageFile( File)方法負(fù)責(zé)設(shè)置 imageFile 對(duì)象,并根據(jù) imageFile 創(chuàng)建 image 3) paintComponent(Griphics)方法負(fù)責(zé)繪制 image 主要程序代碼 import .*。 日歷記事本 34 ()。 while((s=())!=null) { (s+\n)。 BufferedReader inTwo=new BufferedReader(inOne)。 try { File file=new File(dir,fileName)。 } } if(b) { ()。i++) { if(dialyFile[i].startsWith(key)) { b=true。 for(int i=0。 String dialyFile[]=()。 } Java 語(yǔ)言與面向?qū)ο蠹夹g(shù)課程設(shè)計(jì) 33 } public void readfile(File dir,int year,int month,int day) { String fileName=+year++month++day+.txt。 } catch(Exception e){} ()。 File file=new File(dir,fileName)。 } } if(b) { int n=(this, 是 否 刪 除 +year+ 年 +month+ 月+day+日的日志? ,確認(rèn)對(duì)話框 ,)。i++) { if(dialyFile[i].startsWith(key)) { b=true。 for(int i=0。 String dialyFile[]=()。 ()。 } catch(IOException e){} (this, 添 加 日 志 成 功 , 消 息 對(duì) 話 框,)。 ()。 BufferedWriter bw=new BufferedWriter(fw)。 } } else { try { File file=new File(dir,fileName)。 } Java 語(yǔ)言與面向?qū)ο蠹夹g(shù)課程設(shè)計(jì) 31 catch(IOException e){} ()。 (bb)。 byte[]bb=()。 RandomAccessFile out=new RandomAccessFile(file,rw)。 } } if(b) { int n=(this,+year+年 +month+月 +day+日 +已經(jīng)有日志存在,是否添加日志? ,確認(rèn)對(duì)話框 ,)。i++) { if(dialyFile[i].startsWith(key)) { b=true。 for(int i=0。 String dialyFile[]=()。 String fileName=+year++month++day+.txt。 (false)。 (false)。 (false)。 } if(()==) { (false)。 (f)。 int n2=(n1)。 } } } public void itemStateChanged(ItemEvent e) { String n1=()。 } if(()==btn) { Color newColor=(this, 選擇顏色 , ())。 } if(()==copy) { copy()。 (new Font(宋體 ,15))。 } public void setMessage(int year,int month,int day) { (year+年 +month+月 +day+日 )。 (this)。 (this)。 (this)。 setVisible(true)。 add(p1,)。 //(p3,)。 (new BorderLayout())。 setLayout(new BorderLayout())。 (labl)。 (list2)。 (paste)。 (cut)。 paste=new JMenuItem(粘貼 )。 copy=new JMenuItem(復(fù)制 )。 } cut=new JMenuItem(剪切 )。i。i++) { (fontname[i])。 for(int i=0。 GraphicsEnvironment ge=()。 list1=new Choice()。 labl=new JLabel(事件發(fā)生時(shí)間( hh: mm): )。 p3=new JPanel()。 p1=new JPanel()。 (false)。 NotePad() { popup=new JPopupMenu()。 JLabel labl。 Choice list1,list2。 JTextArea ta。 JMenuItem cut,copy,paste。 import .*。 import .*。 3) save( File, int, int, int)方法根據(jù)參數(shù)指定日期保存日志 4) delete( File, int, int, int) 用于刪除日志 5) read( File, int, int, int)用于讀取日志。 ( 2) 方法 1) NotePad()構(gòu)造方法,用來創(chuàng)建 notePad 對(duì)象。 6) btn 是 JButton 創(chuàng)建的一個(gè)按鈕,叫做“顏色”。 4) Copy、 Cut、 Paste 是 JmenuItem 創(chuàng)建的菜單項(xiàng),名字依次是“復(fù)制” , “剪切” , Java 語(yǔ)言與面向?qū)ο蠹夹g(shù)課程設(shè)計(jì) 25 “黏貼”。 2) showMessage 是 JTextField 創(chuàng)建的文本條,用來顯示和日期相關(guān)的數(shù)據(jù)。 validate()。i42。 } public void showMonthCalendar(){ String [] a=()。 (showDay[i])。 showDay[i].setHorizontalAlignment()。i。 } public void setShowDayTextField(JTextField [] t
點(diǎn)擊復(fù)制文檔內(nèi)容
法律信息相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1