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

正文內容

北大計算機系java講義--第二章java小程序(更新版)

2025-07-23 18:44上一頁面

下一頁面
  

【正文】 blic class image extends Applet { Image img。 }catch (MalformedURLException e)。 ? (codebase)。 (new Color(red,green,blue))。 ? 例 :隨機產生顏色 ,并畫圓 26 圖形處理 import 。 ? Font類中常用的方法 GetFamily() getName() getSize() getStyle() isItalic() isPlain() isBold() toString() 23 圖形處理 import 。 ()。()。 if (parameter!=null) font_to_use=parameter。 if (title==null) title=“”。 } 12 小試身手 在起始頁中加入 applet ? html中有關的代碼 APPLET CODE=“” width=600 height=80 /APPLET ? CODEBASE的作用 當 class文件與起始頁文件不在同一個目錄下時 ,使用 CODEBASE說明 APPLET CODE=“” width=600 height=80 CODEBASE=“\myjava\class”/APPLET 13 小試身手 APPLET CODE=“” width=600 height=80 CODEBASE=“\myjava\class” /APPLET C:\ public myjava class showdate javacode C:\ public myjava class showdate javacode P =“sho ” idth=600 height=80 /APPLET 14 小試身手 ? ALIGN,HSPACE,VSPACE Java applet 其它文字 其它文字 vspace hspace APPLET CODE=“” width=600 height=80 vspace=100 hspace=100 /APPLET 15 小試身手 ? 向 applet傳遞參數(shù)的兩個步驟 1. 在起始頁中要有 PARAM標簽 2. 在 applet中要有 getParameter方法 在起始頁中有 : applet code=showdate width=600 heigt=80 param name=rem value=“時間是 : ”/applet 在 applet中有 : string title=getParameter(rem)。 2. 類名 Font 創(chuàng)建一個實例 Font msgFont=new Font(“TimesRoman”,30)。 } 9 所有小應用程序的根源 AWT thread( waiting) update() { clear arae call paint() paint() repaint() Exposure 10 小試身手 ? 起始頁上的時間和日期 ? 介紹兩個類 : 1. 類名 :Date 創(chuàng)建一個實例 Date timeNow=new Date()。 ((),5,50)。 public void init() {title=getParameter (“rem”)。 parameter=getParameter(FONT)。 ()。 () ()。 ? 獲取字體的屬性 Font font=()。 ? () ? (mycolor)。 blue=(int)(()*256)。 ? URL codebase=getCodeBase()。 url2= new URL(“ url1= new URL(url2, “”)。import .*。 import 。 } } 39 動態(tài)效果 線程的應用 ? 實現(xiàn)一個線程 讓 Applet類去實現(xiàn) Runable接口 ,創(chuàng)建一個線程類 改寫方法 start,在其中產生一個新的線程來工作 改寫 stop方法 ,在其中編寫結束線程的程序代碼 引入新的方法 ,將分給線程的工作寫到 run中 40 動態(tài)效果 線程的應用 第一步:實現(xiàn) Runable接口 public class xc extends implements Runnable { Thread smallthread=null。 public class MovingCharacter extends Applet implements Runnable { int x=200。 if(x0) x=200。 if (yheight) up=false。 } void show(Graphics g, int x, int y,int redius) { int hrs_len=(int)(radius*)。 drawNiddle(g, x, y, min_len,theta)。 Clock myClock = new Clock((), (), ())。 spot_clr=new Color(0,0,255)。 (clr)。i。 threadNina=null。} catch(InterruptedException e) {} frame_i=(frame_i+1)%。 } public void stop(){ { if(my_sound!=null) ()。 ? import .*。 . . 67 小結 class Myclass { in
點擊復制文檔內容
教學課件相關推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1