楼主: Lisrelchen
2390 7

JavaFX 8: Introduction by Example [推广有奖]

  • 0关注
  • 62粉丝

VIP

已卖:4194份资源

院士

67%

还不是VIP/贵宾

-

TA的文库  其他...

Bayesian NewOccidental

Spatial Data Analysis

东西方数据挖掘

威望
0
论坛币
50288 个
通用积分
83.6306
学术水平
253 点
热心指数
300 点
信用等级
208 点
经验
41518 点
帖子
3256
精华
14
在线时间
766 小时
注册时间
2006-5-4
最后登录
2022-11-6

楼主
Lisrelchen 发表于 2015-9-27 00:38:28 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
  • JavaFX 8: Introduction by Example, Second Edition
  • By: Carl Dea; Mark Heckler; Gerrit Grunwald; José Pereda; Sean M. Phillips

  • Publisher: Apress

  • Pub. Date: June 03, 2014

  • Print ISBN-10: 1-4302-6460-8

  • Print ISBN-13: 978-1-4302-6460-6

  • Pages in Print Edition: 420

  • Subscriber Rating: [2 Ratings] Subscriber Reviews




二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:introduction troduction example intro ExamP

本帖被以下文库推荐

沙发
Lisrelchen 发表于 2015-9-27 00:39:34
  1. What is JavaFX?

  2. JavaFX is Java’s next-generation graphical user interface (GUI) toolkit that allows developers to rapidly build rich cross-platform applications. Built from the ground up, JavaFX takes advantage of modern GPUs through hardware-accelerated graphics while providing well-designed programming interfaces enabling developers to combine graphics, animation, and UI controls. The new JavaFX 8 is a pure Java language application programming interface (API). The goal of JavaFX is to be used across many types of devices, such as embedded devices, smartphones, TVs, tablet computers, and desktops.

  3. Nandini Ramani of Oracle plainly states the intended direction of JavaFX as a platform in the following excerpt from the screencast Introducing JavaFX:

  4. The industry is moving toward multi-core/multi-threading platforms with GPUs. JavaFX leverages these attributes to improve execution efficiency and UI design flexibility. Our initial goal is to give architects and developers of enterprise applications a set of tools and APIs to help them build better data-driven business applications.
复制代码

藤椅
Lisrelchen 发表于 2015-9-27 00:40:45
  1. Listing 2-4. DrawingText.java

  2. @Override
  3. public void start(Stage primaryStage) {
  4.     primaryStage.setTitle("Chapter 2 Drawing Text");
  5.     Group root = new Group();
  6.     Scene scene = new Scene(root, 300, 250, Color.WHITE);
  7.     Random rand = new Random(System.currentTimeMillis());
  8.     for (int i = 0; i < 100; i++) {
  9.         int x = rand.nextInt((int) scene.getWidth());
  10.         int y = rand.nextInt((int) scene.getHeight());
  11.         int red = rand.nextInt(255);
  12.         int green = rand.nextInt(255);
  13.         int blue = rand.nextInt(255);

  14.         Text text = new Text(x, y, "JavaFX 8");

  15.         int rot = rand.nextInt(360);
  16.         text.setFill(Color.rgb(red, green, blue, .99));
  17.         text.setRotate(rot);
  18.         root.getChildren().add(text);
  19.     }

  20.     primaryStage.setScene(scene);
  21.     primaryStage.show();
  22. }
复制代码

板凳
Lisrelchen 发表于 2015-9-27 00:41:16
  1. Listing 3-1. A Button’s OnAction Set with an Anonymous Inner Class

  2. Button btn = new Button();
  3. btn.setOnAction(new EventHandler<ActionEvent>() {
  4.     public void handle(ActionEvent event) {
  5.        System.out.println("Hello World");
  6.     }
  7. });
复制代码

报纸
Lisrelchen 发表于 2015-9-27 00:41:53
  1. Listing 3-3. One Statement with an Explicit Return, and the Other with an Implicit Return

  2. x -> { return x * x; }   // must explicitly return result
  3. x -> x * x;              // evaluates and implicitly returns result
复制代码

地板
Lisrelchen 发表于 2015-9-27 00:43:02
  1. Listing 3-4. Three Syntactically Equivalent Lambda Expressions to Set Action Code on a JavaFX Button

  2. btn.setOnAction( (ActionEvent event) -> {System.out.println("Hello World"); } );
  3. btn.setOnAction( (event) -> System.out.println("Hello World") );
  4. btn.setOnAction( event -> System.out.println("Hello World") );
复制代码

7
牛尾巴 发表于 2015-9-27 07:54:51
已有 1 人评分经验 论坛币 学术水平 收起 理由
Nicolle + 100 + 100 + 1 精彩帖子

总评分: 经验 + 100  论坛币 + 100  学术水平 + 1   查看全部评分

8
rookie2008 发表于 2015-9-27 08:21:14
多谢楼主

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
jg-xs1
拉您进交流群
GMT+8, 2026-1-7 05:26