javafx

移动互联网时代Java依旧火热,这几本神仙文档助你占一席之地

非 Y 不嫁゛ 提交于 2020-12-04 11:28:18
Java是一门伟大的程序设计语言,同时,它还是基于Java语言从嵌入式开发到企业级开发的平台。在风起云涌的计算机技术发展历程中,Java 的身影随处可见,而且生命力极其强大。1995 年,Java Applet使得Web网页可以表现精彩和互动的多媒体内容,促进了Web的蓬勃发展。之后随着Web的发展,应用Web成为大型应用开发的主流方式,Java凭借其“一次编译,到处运行”的特性很好地支持了互联网应用所要求的跨平台能力,成为服务器端开发的主流语言。Java EE至今依然是最重要的企业开发服务器端平台。2004年再次产生了对Web客户端体验的强烈需求,促使富因特网应用技术广泛流行,从Java Web Start到现在的JavaFX,都是重要的富因特网应用技术。 现在我们进入了移动互联网时代,而Java依然是当之无愧的主角。作为开发者,想要在互联网时代其中有一席之地,一定需要多学习新的知识。 Java并发编程实战 本书深入浅出地介绍了Java 线程和并发,是一本完美的Java并发参考手册。书中从并发性和线程安全性的基本概念出发,介绍了如何使用类库提供的基本并发构建块,用于避免并发危险、构造线程安全的类及验证线程安全的规则,如何将小的线程安全类组合成更大的线程安全类,如何利用线程来提高并发应用程序的吞吐量,如何识别可并行执行的任务,如何提高单线程子系统的响应性

JavaFX WhatApp-Like ConversationView

夙愿已清 提交于 2020-12-01 17:55:17
问题 I'm trying to make a WhatsApp-Like Conversation-View in JavaFX. In order to make the sent messages appear on the right and the received messages appear on the left then I cannot use TextArea. How can I do it? I tried GridPane without TextArea but it didn't make things easier. Moreover, is it a good practice to make controls static? Extra: if you can also help me do the chat bubble behind the text, it would be great. Here is my code: public class ConversationView implements WhatAppView {

JavaFX WhatApp-Like ConversationView

女生的网名这么多〃 提交于 2020-12-01 17:50:02
问题 I'm trying to make a WhatsApp-Like Conversation-View in JavaFX. In order to make the sent messages appear on the right and the received messages appear on the left then I cannot use TextArea. How can I do it? I tried GridPane without TextArea but it didn't make things easier. Moreover, is it a good practice to make controls static? Extra: if you can also help me do the chat bubble behind the text, it would be great. Here is my code: public class ConversationView implements WhatAppView {

JavaFX WhatApp-Like ConversationView

China☆狼群 提交于 2020-12-01 17:47:45
问题 I'm trying to make a WhatsApp-Like Conversation-View in JavaFX. In order to make the sent messages appear on the right and the received messages appear on the left then I cannot use TextArea. How can I do it? I tried GridPane without TextArea but it didn't make things easier. Moreover, is it a good practice to make controls static? Extra: if you can also help me do the chat bubble behind the text, it would be great. Here is my code: public class ConversationView implements WhatAppView {

JavaFX WhatApp-Like ConversationView

这一生的挚爱 提交于 2020-12-01 17:45:35
问题 I'm trying to make a WhatsApp-Like Conversation-View in JavaFX. In order to make the sent messages appear on the right and the received messages appear on the left then I cannot use TextArea. How can I do it? I tried GridPane without TextArea but it didn't make things easier. Moreover, is it a good practice to make controls static? Extra: if you can also help me do the chat bubble behind the text, it would be great. Here is my code: public class ConversationView implements WhatAppView {

java源码学习-JDK14之jpackage命令

核能气质少年 提交于 2020-12-01 10:22:23
鲁班学院 java源码学习- JDK14之jpackage命令 jpackage命令使用场景 使用场景是面向java桌面端程序打包. 可以让windows/mac 直接双击使用java程序,对系统里面有没有jdk/jre不做要求. 在这里,我们先理一下以前java桌面程序是怎么运行的: jdk8及以前 这时候的java客户端程序,主要分两部分, 一部分是可执行jar包, 一部分是电脑里面要装jdk/jre , 然后通过 java -jar XXXXX.jar 来运行程序. jdk9及以后的模块化 这是java模块化的一个分界线,其实jdk9,jdk10,我都没有用过, 我是直接尝试的jdk11. 在模块化的基础上, 项目多了一个文件, moudle-info.java 如下图所示: 如上图,所示,主要是 requires , opens , exports 这三个关键字. requires : 当前模块想要运行的话,需要哪些依赖,相当于在maven引包的基础上,要再声明一遍依赖 opens: 当前模块中的哪些包,可以被反射. 如fxml中要声明处理的controller , 每当fxml加载的时候,都会去新建一个controller实例, 所以需要opens controller的包名给javafx.fxml exports: 当前模块有哪些包,可以被引用.

How to drag and drop button onto GridPane?

人走茶凉 提交于 2020-11-30 00:37:47
问题 I'm working on a school project creating a simple battleship game and i want to use the Drag And Drop function to drag buttons from HBox on the bottom of the screen to the GridPane that the player uses to place ships on. But i can't get it to work properly. Here's a picture of my board per now. I have tried to use the button.setOnMouseDragged(e -> {CODE HERE}); but it doesnt work. Here is the code i used for my window public class GridOrganizer { private BorderPane borderPane; public

How to drag and drop button onto GridPane?

北城以北 提交于 2020-11-30 00:32:55
问题 I'm working on a school project creating a simple battleship game and i want to use the Drag And Drop function to drag buttons from HBox on the bottom of the screen to the GridPane that the player uses to place ships on. But i can't get it to work properly. Here's a picture of my board per now. I have tried to use the button.setOnMouseDragged(e -> {CODE HERE}); but it doesnt work. Here is the code i used for my window public class GridOrganizer { private BorderPane borderPane; public

Trying to add actions to my main menu with Scene Builder and Netbeans and I don't understand why I'm getting a InvocationTargetException

余生颓废 提交于 2020-11-30 00:01:39
问题 I was following along with a video from school and I swore I added everything they told me to add but I keep getting problems. The only thing that I can think of is that the person in the video is running Netbeans 8.2 while I am running Netbeans 11 and I know that JavaFX isn't as easy on the newer versions of Netbeans... My project runs until I add actions to my Main Menu buttons and I don't understand why it stops running. This is what my error output says: Exception in Application start

Trying to add actions to my main menu with Scene Builder and Netbeans and I don't understand why I'm getting a InvocationTargetException

百般思念 提交于 2020-11-29 23:58:49
问题 I was following along with a video from school and I swore I added everything they told me to add but I keep getting problems. The only thing that I can think of is that the person in the video is running Netbeans 8.2 while I am running Netbeans 11 and I know that JavaFX isn't as easy on the newer versions of Netbeans... My project runs until I add actions to my Main Menu buttons and I don't understand why it stops running. This is what my error output says: Exception in Application start