91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 0.02M
    文件類型: .zip
    金幣: 1
    下載: 0 次
    發(fā)布日期: 2021-02-20
  • 語言: Java
  • 標(biāo)簽:

資源簡介

Java入門-飛行文字(實(shí)例29).zip

資源截圖

代碼片段和文件信息

import?java.awt.*;
import?java.applet.*;

public?class?FlyTextapplet?extends?applet?implements?Runnable{
???
???Image?image;?//該applet的Image對(duì)象
???Graphics?graphics;?//該applet的Graphics對(duì)象
???Font?font;?//顯示字體
???String?message;?//顯示文本
???Thread?thread;?//飛行運(yùn)動(dòng)線程
???int?xpos?ypos?fontsize;?//X坐標(biāo)Y坐標(biāo)及字體大小
???
???public?void?init(){???
??????image?=?createImage(getSize().width?getSize().height);???//得到Image實(shí)例
??????graphics?=?image.getGraphics();??//得到Graphics實(shí)例
??????message?=?getParameter(“Text“);?//得到文本參數(shù)
??????if(message?==?null){?//如果顯示文本為空
?????????message?=?“飛行文字“;?//設(shè)置默認(rèn)文本
???????}
??????font?=?new?Font(“TimesRoman“?Font.BOLD?10);??//實(shí)例化字體
???}
???
???public?void?start(){
??????if(thread?==?null){
?????????thread?=??new?Thread(this);??//實(shí)例化線程
?????????thread.start();?//運(yùn)行線程
??????}
???}
???
???public?void?run(){
??????while(thread?!=?null){?????????
?????????if(fontsize?>getSize().height)?//如果字體尺寸過大
????????????fontsize?=?0;?//重設(shè)字體尺寸
?????????try

?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件??????260434??2004-05-14?17:16??35-1.bmp
?????文件??????260434??2004-05-14?17:17??35-2.bmp
?????文件?????????194??2004-05-13?18:24??FlyText.HTML
?????文件????????2259??2004-05-18?23:06??FlyTextapplet.class
?????文件????????2276??2004-05-18?23:08??FlyTextapplet.java

評(píng)論

共有 條評(píng)論