javafx

JavaFX and Maven in Intellij: JAVA_HOME set but “Unrecognized option --module-path” error persisting

有些话、适合烂在心里 提交于 2020-08-23 07:31:57
问题 Using Maven and JavaFX in Intellij (2019.1). I have been following this tutorial. I have a curious error that keeps occurring - every time I keep running the javafx:run plugin, it fails, giving this error: Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit. Unrecognized option: --module-path However, when I put the executable in the javafx-maven-plugin ( <executable>"C:\Program Files\Java\jdk-12.0.1\bin\java.exe"</executable> ) it works.

JavaFX FileChooser

。_饼干妹妹 提交于 2020-08-20 18:28:57
问题 I came across a little problem now with JavaFX. I tried to make a filechoosing in my code where I can point on a FOLDER instead of a file. Currently I don't have a solution for it. Do you know a workaround (except using JFileChooser from swing)? Many thanks for the answers in advance edit: I already got now an answer, trying to test it, but I forgot to mention the version of JavaFX. It is the latest 2.0.3 stable here, released a few days ago (but the initial non-beta 2.0 and 2.0.1 had this

JavaFX FileChooser

一笑奈何 提交于 2020-08-20 18:27:52
问题 I came across a little problem now with JavaFX. I tried to make a filechoosing in my code where I can point on a FOLDER instead of a file. Currently I don't have a solution for it. Do you know a workaround (except using JFileChooser from swing)? Many thanks for the answers in advance edit: I already got now an answer, trying to test it, but I forgot to mention the version of JavaFX. It is the latest 2.0.3 stable here, released a few days ago (but the initial non-beta 2.0 and 2.0.1 had this

Java Timer - Updating Labels with Platform.runLater

岁酱吖の 提交于 2020-08-20 11:16:27
问题 This code sample is part of a Stopwatch class that is part of a larger project that is meant to be a desktop gui app that models after Android's Clock. I have labels for seconds, minutes, hours, etc. that are supposed to be updated from an infinite while loop that is inside a timer task which is ran while a boolean state is true. The while loop is supposed to update the GUI labels with the real time. I have the timer task execute every millisecond. Why does my GUI hang as soon as the program

JDK JRE JVM的关系

爱⌒轻易说出口 提交于 2020-08-19 09:37:13
JDK JDK是(Java Development Kit)的缩写,指的是JAVA软件开发工具包(SDK)。 JDK是整个java开发的核心,它包含了JAVA的运行环境(JVM+JAVA系统类库)和JAVA工具。 在目录下面有四个文件夹、一个src类库源码压缩包和几个声明文件。 其他四个文件夹分别是:bin、include、lib、 jre以及一些版本信息文件。 JDK目录介绍 bin:包含一些用于开发Java程序的工具,例如:编译工具(javac.exe)、运行工具 (java.exe) 、打包工具 (jar.exe)等,最主要的是编译器(javac.exe)。 include:C语言的头文件,用于支持Java程序设计。 jre:Java运行时环境的根目录(注意:这里的bin、lib文件夹和jre里的bin、lib是不同的)。 lib:包含开发Java程序所使用的类库文件。 javafx-src.zip:包含 JavaFX 平台源代码的压缩包。 src.zip:包含 Java 平台源代码的压缩包。 其他:COPYRIGHT和LICENSE为版权和签证的说明性文档,以及一些引用许可证。 JRE JRE(Java Runtime Environment,Java运行环境),包含JVM标准实现及JAVA核心类库。 JDK的安装目录下有一个jre目录,里面有两个文件夹bin和lib。

【赠书活动】赠送清华社的《好好学Java:从零基础到项目实战》

拥有回忆 提交于 2020-08-18 03:02:43
零基础学习Java的朋友有福利啦,本博客现联合公众号“老欧说安卓”开展送书活动,下面就是本次活动要赠送的书籍封面 书籍信息: 作者:欧阳燊 出版时间:2020年7月 定价:128元 版本:基于Java11和IDEA 简介:全书共分为17章。其中第1~6章介绍Java的常见数据类型及开发,包括基本变量类型、数组类型、包装变量类型、字符串类型以及日期时间类型;第7~11章介绍面向对象的开发过程,包括面向对象的三要素(封装、继承、多态)、面向对象的扩展(嵌套、枚举、抽象、接口)、面向对象的应用(容器、泛型、文件IO)、面向对象的特殊处理(异常、反射、注解)以及基于面向对象的函数式编程;第12~14章介绍Java语言的界面编程,包括AWT、Swing、JavaFX三大图形框架的编码运用;第15~17章介绍Java编程的高级开发,包括多线程、网络通信和数据库操作,各章末尾着重描述打地鼠游戏、即时通信工具、诗歌管理系统三大实战项目的软件设计及编码实现。 配套源码的下载二维码如下 配套课件的下载二维码如下 赠书规则: 在博文末尾发表评论, 评论内容需跟Java学习有关,还要留下QQ群昵称(方便联系寄书) 。活动结束后,将挑选两条精彩评论的读者送出《好好学Java:从零基础到项目实战》。 同时公众号“老欧说安卓”也开展该书的送书活动,公众号的赠书规则为:在活动文章下方留言,活动结束后

JavaFX progress indicator stop spinning when heavy load runs

拥有回忆 提交于 2020-08-11 05:41:45
问题 I am trying to implement busy indicator using ProgressIndicator. But when the heavy load starts the indicator freezes. A sample code is shown below. import javafx.beans.value.ChangeListener; import javafx.scene.Scene; import javafx.scene.control.ProgressIndicator; import javafx.scene.layout.StackPane; import javafx.scene.paint.Color; import javafx.stage.Modality; import javafx.stage.Stage; import javafx.stage.StageStyle; public class BusyIcon { private static Stage busyWindow; public static

JavaFX progress indicator stop spinning when heavy load runs

萝らか妹 提交于 2020-08-11 05:41:28
问题 I am trying to implement busy indicator using ProgressIndicator. But when the heavy load starts the indicator freezes. A sample code is shown below. import javafx.beans.value.ChangeListener; import javafx.scene.Scene; import javafx.scene.control.ProgressIndicator; import javafx.scene.layout.StackPane; import javafx.scene.paint.Color; import javafx.stage.Modality; import javafx.stage.Stage; import javafx.stage.StageStyle; public class BusyIcon { private static Stage busyWindow; public static

盘点 6 个被淘汰的 Java 技术,它们都曾经风光过!

孤街醉人 提交于 2020-08-11 05:26:21
大家好啊,今天栈长给大家分享下我的开发历程中,我知道的那些被淘汰的技术或者框架,有些我甚至都没有用过,但我知道它曾经风光过。 废话不多说,下面我要开始吹了…… 1、Swing 下面这个是用 swing 开发的: 图来源网络,有没有似曾相识的感觉?懂的自然懂! 栈长去年中秋也用过 swing: 这个中秋,我用 Java 画了一个月饼! Swing 算是 Java 早期代替 AWT 的桌面应用 GUI 开发工具包,一个听到就已经淘汰的技术,给我的感觉就是丑丑丑!现在与 AWT 一起在时间这个长河里长眠。 如果 Java GUI 库发展历程分为三代,可以是: AWT > SWING > JAVAFX 随着 JavaFx 的发布,加速 SWING 的被淘汰。下面这个是用 JavaFx 开发的: 图来源:zhihu.com/question/54498643/answer/271632290 现在 JavaFx 也有十来年了,虽然这篇帖子也在说 JavaFx 淘汰了的,只是现在桌面应用不是主流吧,我也没用过不敢乱说,JavaFx 在桌面应用开发应该还是有一席之地的。 2、JSF JSF:Java Server Faces JSF是一种用于构建 Java Web 应用程序的表现层框架,和 Struts 一样性质的框架。 图来源: https://javabeat.net/jsf-2/ 国内用

Maven JavaFx project compiles but running from console give “Missing JavaFX application class” error msg

本小妞迷上赌 提交于 2020-08-11 03:15:34
问题 I'm working migrating my Maven JavaFX app from Java 8 to Java 11. Iv'e updated the plugins in my pom.xml to the most current (Java 11 compliant) plugins. Compilation runs fine, giving me the jars and all dependencies and modules in the right directories under the "target" folder but when I try to run my jar file I get the dreaded "Missing JavaFX application class " error. No matter how I try to change the plugin configuration - I always get this error msg and the app won't run. Now, more