日韩无码专区无码一级三级片|91人人爱网站中日韩无码电影|厨房大战丰满熟妇|AV高清无码在线免费观看|另类AV日韩少妇熟女|中文日本大黄一级黄色片|色情在线视频免费|亚洲成人特黄a片|黄片wwwav色图欧美|欧亚乱色一区二区三区

RELATEED CONSULTING
相關咨詢
選擇下列產(chǎn)品馬上在線溝通
服務時間:8:30-17:00
你可能遇到了下面的問題
關閉右側工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
使用JavaFx創(chuàng)建可拖動的Applet示例

JavaFx運行時的下載地址:
http://javafx.com/downloads/all.jsp

我的appspot地址,打開即可看到示例:
http://sonicluo3.appspot.com/

JavaFx的主方法 MyJavaFXStage.fx
Java代碼

 
 
 
  1. package org.webbiscuit;   
  2.   
  3. import javafx.scene.*;   
  4. import javafx.scene.image.*;   
  5. import javafx.stage.*;   
  6. import javafx.scene.text.*;   
  7. /**  
  8.  * @author sonic  
  9.  */  
  10.   
  11. Stage {   
  12.     title: "Application title"  
  13.     width: 300  
  14.     height: 280  
  15.     scene: Scene {   
  16.         content:[   
  17.          Text {   
  18.             font : Font {   
  19.                 size : 16  
  20.             }   
  21.             x: 10, y: 200  
  22.             content: "Hello,這是一個 JavaFx + 可拖動Applet\n+ GAE 的應用! It's very cool!!"  
  23.         },   
  24.             ImageView { image: Image { url: "{__DIR__}GAE_java.png"  }  }   
  25.         ]   
  26.     }   
  27. }  
  28. package org.webbiscuit;
  29. import javafx.scene.*;
  30. import javafx.scene.image.*;
  31. import javafx.stage.*;
  32. import javafx.scene.text.*;
  33. /**
  34.  * @author sonic
  35.  */
  36. Stage {
  37.     title: "Application title"
  38.     width: 300
  39.     height: 280
  40.     scene: Scene {
  41.         content:[
  42.          Text {
  43.             font : Font {
  44.                 size : 16
  45.             }
  46.             x: 10, y: 200
  47.             content: "Hello,這是一個 JavaFx + 可拖動Applet\n+ GAE 的應用! It's very cool!!"
  48.         },
  49.             ImageView { image: Image { url: "{__DIR__}GAE_java.png"  }  }
  50.         ]
  51.     }
  52. }

部署的html文件如下,內嵌了JavaFx的Applet.
Html代碼

 
 
 
  1.   
  2.   
  3.  http-equiv="Content-Type" content="text/html; charset=gb2312">  
  4. </strong>JavaFXApplet<strong>  
  5.   
  6.   
  7. 按住 Alt 鍵,然后拖動鼠標就可以把Applet拉到桌面了.

      
  8.   
  9.   
  10.   
  11.   
  12.  http-equiv="Content-Type" content="text/html; charset=gb2312">
  13. </strong>JavaFXApplet<strong>
  14. 按住 Alt 鍵,然后拖動鼠標就可以把Applet拉到桌面了.

//令做可拖動的純粹的Applet還有另外一種方式的,找個時間整理了再發(fā)上來


本文標題:使用JavaFx創(chuàng)建可拖動的Applet示例
路徑分享:http://www.5511xx.com/article/cdjhooo.html