创建JavaFX项目

用 IntelliJ IDEA 创建一个简单的 JavaFX 项目 鉴于国内中文的 JavaFX 资料太少,因此在这里简单介绍一些 JavaFX 的常用组件和使用方法。 如果是使用过 WPF 或者对 web 前端组件有一些了解,那么 JavaFX 对你来说应该是非常简单的,基础组件差不多,只是在写法层面上有一点不同。 今天我们的目标是用 IntelliJ IDEA 创建一个简单的 JavaFX 项目,能跑就行,在下面的文章中会详细介绍组件功能。 打开你的 IntelliJ IDEA,我们创建一个新的项目,选择 JavaFX,然后点击 next。 填写好你的项目名称以 阅读详情

Use the steps in this section to create your JavaFX project, which will contain the source file for your first JavaFX application. Note that the screen captures used in this document were taken on a Windows XP system.

  1. Ensure that your Eclipse IDE already has the JavaFX plugin for Eclipse software installed. If necessary, revisit the What to Download and Install section.
  2. Start the Eclipse IDE, if it is not already started. Close the Welcome screen, if it appears.
  3. Create a new JavaFX project.

    1. Choose File > New > Project to start the New Project wizard.
    2. Expand the JavaFX node, select JavaFX Project node, and click Next, as shown in Figure 1.

       

       

      Figure 1: Selecting JavaFX Project Wizard

       

    3. In the Welcome dialog box, as shown in Figure 2, review the information about the anonymous usage data collection and click OK if you agree to participate.

       

       

      Figure 2: Anonymous Usage Data Collection Information

       

    4. In the Create a JavaFX Project page, type FirstJavaFXApp for the Project name, as shown in the next image.

       

       

      Figure 3: Creating a JavaFX Project Wizard

       


      You can create a new project from scratch or from an already existing source, as shown in the Contents section. For this tutorial, leave the default selection for Create new project in workspace.
    5. Leave all other default values unchanged in the Create a JavaFX Project page and click Finish.

      Desktop is the default JavaFX profile used for a new JavaFX project. This profile sets the application to run on the desktop. The Mobile Profile enables you to run the application on a mobile device or the JavaFX Mobile Emulator tool that is bundled with the JavaFX SDK. The system's default Java Runtime Environment (JRE) installation is used for the new JavaFX project that you're creating.
    6. (Optional) If you installed the JavaFX SDK in a non-default location, you might be prompted to set the JAVAFX_HOME variable. Follow the prompts to set this classpath variable. Make sure that you click Folder in the Edit Variable Entry dialog box and navigate to the location of the JavaFX SDK installation folder, for example, javafx-sdk1.2. After that location is set, continue with the next step below.
    7. When prompted to open the JavaFX perspective, click Yes.

      The JavaFX Perspective ensures that the JavaFX Snippets and Outline views are available to you when you are working
      on a JavaFX application.

      The IDE continues with the project creation. The FirstJavaFXApp project opens in the Package Explorer window, as shown in Figure 4. Notice that the Snippets window on the right becomes available after you create the project and subsequently displays JavaFX code snippets that you can use.

       

       

      Figure 4: FirstJavaFXApp Project Opened in Package Explorer

       

Adding the Java Package and Main.fx File

  1. Create the Java package for the project.

    1. Expand the FirstJavaFXApp folder in the Package Explorer.

      The subfolders include the folders for source files and libraries needed by the project.
    2. Right-click the src folder and select New > Package.
    3. In the New Java Package dialog box, type gstutorial in the Name text field and click Finish.

       

      Figure 5: Creating a New Java Package

       

  2. Create the Main.fx source file.

    1. Right-click the gstutorial node and select New > Empty JavaFX Script.
    2. In the New JavaFX Script dialog box, type Main in the Name text field and click Finish.

      The Main.fx file is opened in the source editor area. Notice that the comment block for the author information is initially folded, as shown in Figure 6. Click the icon in the margin area to see how the code-folding feature works. It expands the comment block. You can click the to collapse the comment block again.

       

       

      Figure 6: Main.fx File Created

  3. Add the Stage template.

    1. In the Snippets window to expand it, click the Applications tab to expand it.
    2. Select and drag the Stage object to the source editor, as shown in Figure 7.

       

      Figure 7: Adding the Stage Object

    3. In the Insert Template dialog box for Stage, edit the title, width, and height variables, as shown in Figure 8.

       

      Figure 8: Modifying Stage Template

    4. Click Insert.

      Notice that the Stage code snippet includes the object literals Stage and Scene. The import statements for the Stage and Scene packages were automatically added when the code snippet was inserted. These object literals represent key concepts within the JavaFX application and are described in the following table.

      Table 1: Object Literals Created With Stage Template
      Object LiteralDescription
      StageThe top-level container window required to display any visible JavaFX objects. The default instance variables title, width, and height define the text that appears on the window's top border and the window's height and width. The scene variable defines an instance of the Scene object literal, which sets the area in which you can place the JavaFX objects.
      SceneSimilar to a drawing surface for the graphical content of your application. The scene instance variable has a content variable that is used to hold JavaFX graphical elements and defines the graphical content of your application. The instance variables, width and height, define the width and height of the content area. For more information about the Scene class, see Presenting UI Objects in a Graphical Scene, a lesson in Building GUI Applications With JavaFX.

      Note: For more information, see Using Objects, a lesson in Learning the JavaFX Script Programming Language.


  4. Modify the Scene object to specify the text that you want to appear in the application. You also need to add the import statement for the TextAlignment class.

    1. Add the following import statement at the top of the file, just below where the first import statements were defined.
      Source Code
      import javafx.scene.text.*;
    2. Modify the content variable as shown in the following code example. You can copy the lines in bold and paste them into the editor to replace the current content code block.
      Source Code
      Stage {
           title: "First JavaFX App"
           scene: Scene {
               width: 250
               height: 250
               content: [
                   Text {
                      font: Font { size: 22 }
                      x: 20, y: 90
                     textAlignment: TextAlignment.CENTER
                     content:"Welcome to /nJavaFX  World"
                   }  //Text
               ] // content
           } // Scene 
      } // Stage
  1. Define the basic Circle object from which you create the sphere by expanding the Basic Shapes section in the Snippets view and dragging the Circle code snippet in the line above the Text code block, as shown in the following figure.

     

    Figure 9: Dragging the Circle Code Snippet From the Snippets Window

  2. In the Insert Template dialog box for Circle, modify the circle's radius variable to have the value of 90 and click Insert.

    The Circle code snippet is added to the Main.fx source file, along with the necessary import statements for the Circle and Color classes APIs.
  3. Place your cursor over the word Circle to enable the Circle class API to be displayed in a pop-up window, as shown in the following figure.

    You can click inside the pop-up window to view the entire API documentation for the class. Click anywhere in the source editor to dismiss the API pop-up window.

     

     

    Figure 10: Pop-up API Window

  4. Add a new RadialGradient setting to the circle. This gives the circle depth and makes it look more like a sphere.

    1. At the top of the Main.fx file, add the import statements that include the packages containing the RadialGradient and Stop classes used in the code that you are adding. Begin by typing the following line of code.
      Source Code
      import javafx.scene.paint.
      At the end of the line you just typed, press Ctrl+spacebar to see the code completion pop-up window, as shown in the following figure. Select RadialGradient from the list and press Enter.

      Figure 11: Code Completion for RadialGradient Class

    2. Repeat the previous step for adding the import statements for the Stop class, which is also needed to define the radial gradient of the sphere. The following are the import statements that should have been added.
      Source Code
        import javafx.scene.paint.RadialGradient; 
        import javafx.scene.paint.Stop;
            
    3. Replace the fill variable in the Main.fx source file with the following source code in bold. You can copy the lines in bold, including the closing square brackets and braces for the fill variable, and paste them into the source editor.
      Source Code
        Stage {
          title: "First JavaFX App"
          scene: Scene {
              width: 250
              height: 250
              content: [
                  Circle {
                      centerX: 100, 
                      centerY: 100,
                      radius: 90,
                      fill: RadialGradient {
                              centerX: 75,
                              centerY: 75,
                              radius: 90 
                              proportional: false
                              stops: [
                                  Stop {
                                      offset: 0.0 
                                      color: Color.web("#3B8DED")
                                  },
                                  Stop {
                                      offset: 1.0 
                                      color: Color.web("#044EA4")
                                  }
                              ] // stops
                      } // RadialGradient
                   } // Circle
                   Text {
                     font: Font { size: 22 }
                     x: 20, y: 90
                     textAlignment: TextAlignment.CENTER
                     content:"Welcome to /nJavaFX  World"
                   }  //Text
              ] // content
           } // Scene  
      } // Stage
  5. Save the source code (Ctrl+S on Windows and Cmd+S on Mac) and run the project to see a preview of what you have done so far.

    1. Right-click the FirstJavaFXApp > src > gstutorial > Main.fx node in the Package Explorer and select Run As > JavaFX Application.
    2. In the Edit Configuration dialog box, notice that in the Profile - Target field the default run profile used is Desktop, as shown in Figure 12. Leave Desktop profile -Run as Application as the target run profile.

      You also have the option to run the JavaFX project as an applet, as a Java Web Start application, or as a mobile application by choosing the appropriate Profile - Target option from the drop-down list.

       

      Figure 12: Setting the Run Profile for the FirstJavaFXApp Project

    3. Click Run.

      A new window displays the sphere that you just created, as shown in the following figure.

       

       

      Figure 13: First Run of the JavaFX Sphere

    4. Exit the First JavaFX App window and proceed with the rest of the tutorial.

Adding Animation


In this section, you add the opacity and the animation that changes the sphere's opacity.

 

  1. In the source editor, add the opacity variable at the top of the source file and set its initial value to 1.0, as shown here in bold.
    Source Code
     import javafx.scene.paint.Color;
     import javafx.scene.paint.RadialGradient;
     import javafx.scene.paint.Stop;   
     
     var opacity = 1.0;
    
    This variable is used in the timeline animation that you create later.
  2. Add the opacity instance variable to the Circle object and bind this instance variable to the opacity global variable, as shown in bold in the following code example.
    Source Code
     Circle {
         centerX: 100, 
         centerY: 100,
         radius: 90,
         opacity: bind opacity
         fill: RadialGradient {
             centerX: 75
             centerY: 75
             radius: 90
             proportional: false
             stops: [
                 Stop {
                     offset: 0.0 
                     color: Color.web("#3B8DED")
                 },
                 Stop {
                     offset: 1.0 
                     color: Color.web("#044EA4")
                 }
             ] // stops
         } // RadialGradient
     } //Circle

  3. Expand the Animations section in the Snippets view, select Timeline, and drag the Timeline code snippet to the line just above the Stage code block, as shown in the following figure.

     

    Figure 14: Dragging Timeline Code Snippet From the Snippets View to the Source Editor

    Animation occurs along a timeline, represented by a javafx.animation.Timeline object. Each timeline contains one or more key frames, represented by javafx.animation.KeyFrame objects. For more information about animation, see Creating Animated Objects, a lesson in Building GUI Applications With JavaFX.
  4. In the Insert Template dialog box for Timeline, change the value of the time instance variable from 1s to 5s and click Insert.

    The Timeline object literal appears as shown here.
    Source Code
    Timeline {
        repeatCount: Timeline.INDEFINITE,
        keyFrames : [
            KeyFrame {
                time : 5s,
                canSkip: true
            } // KeyFrame
        ] // keyFrames
    } // Timeline
    
    
    This timeline repeats indefinitely on a five-second interval. The value of the time instance variable, five seconds, defines the elapsed time at which the values within the key frame will be set in a single cycle of the Timeline object. The next couple of steps of this tutorial define those values that will be set.

 

  1. Drag the Animations > Values code clip from the Snippets view to the line just after the canSkip variable.

    Figure 15: Dragging Values Code Clip From the Snippets Window to the Source Editor

    Values defines the list of target variables and the desired values that they should interpolate at the specified time of the KeyFrame.
  2. In the Insert Template dialog box for Values, change the values of value from 0.0 to 0.2 and the value of variable to opacity.

    This code changes the opacity of the sphere.
  3. Click Insert.

    The values variable is now as shown here in bold.
    Source Code
     Timeline {
        repeatCount: Timeline.INDEFINITE,
        KeyFrames : [
                KeyFrame {
                time : 5s,
                canSkip: true
                values : [
                   opacity => 0.2 tween Interpolator.LINEAR
                ] // values
            } // KeyFrame
        ] // keyFrames
    } // Timeline
    
    The desired value of the opacity variable is defined within the five-second interval of the key frame. The => operator provides a literal constructor (a special notation) that makes it easier to express the list of key-interpolated values or object properties.

    In this case, the tween operator constructs the interpolated values for the opacity between 1.0 and 0.2 to create the gradual change in the sphere's opacity.
  4. Change the interpolator value from LINEAR to EASEBOTH.

    The Interpolator.EASEBOTH is the built-in interpolator instance that provides for ease-in and ease-out behavior.
  5. Add another KeyFrame instance to provide a change of opacity from 0.2 to 1.0 within the next five-second interval. Copy the second KeyFrame code block that is shown in bold in the following code example and paste it just below the first KeyFrame object as shown next.
    Source Code
     Timeline {
        repeatCount: Timeline.INDEFINITE,
        keyFrames : [
            KeyFrame {
                time : 5s,
                canSkip: true
                values : [
                   opacity => 0.2 tween Interpolator.EASEBOTH  
                ] // values
            } // KeyFrame
            KeyFrame {
                time : 10s,
                canSkip: true
                values : [
                   opacity => 1.0 tween Interpolator.EASEBOTH  
                ] // values
            } // KeyFrame
        ] // keyFrames
    } // Timeline
    
  1. Add .play(); to the end of the Timeline object declaration, as shown in bold in the following code example.

    The play() method plays the timeline as defined. The completed Timeline object is shown here.
    Source Code
    Timeline {
            repeatCount: Timeline.INDEFINITE,
            keyFrames: [
                KeyFrame {
                    time: 5s,
                    canSkip: true
                    values : [
                        opacity => 0.2 tween Interpolator.EASEBOTH				
                    ] // values
                } // KeyFrame
                KeyFrame {
                    time: 10s,
                    canSkip: true
                    values : [
                        opacity => 1.0 tween Interpolator.EASEBOTH				
                    ] // values
                } // KeyFrame
          ] // keyFrames
    }.play();
    
    
  2. Save the latest changes that you made, select the Main.fx node in the Package Explorer, click the drop-down arrow next to the Run icon  on the main toolbar, and select gstutorial.Main from the list.

    Congratulations! You've just created your first animated JavaFX application.
初识JavaFX-IDEA中创建第一个JavaFX项目 创建第一个Java FX的项目&Java FX项目基础环境搭建 阅读详情

相关推荐

Idea2024中搭建JavaFX开发环境并创建运行项目

以上是作者在开发JavaFX项目部署环境时遇到的问题,在解决问题的过程中逐步形成了个人可行的项目创建流程和搭建模式,供初学者参考。在项目文件编辑配置中可能会遇到无法选中主类问题,作者的做法是将目录结构中的java、resource设置为源代码根目录。如遇到【为识别此 RUI注册的资源(设置|语言和框架|架构和DTD)】问题,复制对应的RUI在设置中添加即可,如下图所示。选择应用程序主类(作者编写的应用程序入口类),当把项目中主程序所在根目录设置为源代码根目录后,此处能显示主类,选择确认。

编程语言教学工作者的博客 4063

安装javaFX

简介 JavaFX插件e(fx)eclipse是一组工具和必要的库,它们帮助您执行JavaFX编程,确保您已经作为插件将其安装在eclipse上了。JavaFX Scene BuilderJavaFX Scene Builder是一种可视化设计工具,它允许通过拖放快速创建应用程序界面。 并且代码创建为XML格式的文件。 这是一个选项,为了执行JavaFX编程,最好也应该安装它。 ** Oracle...

weixin_44298590的博客 9547

使用eclipse+JavaFx SDK创建JavaFx项目(非模块化)

环境准备 项目 版本 地址 Java Java SE 11 官网下载地址 eclipse clipse-jee-2020-12-R-win32-x86_64 官网下载地址 JavaFx JavaFX Windows SDK 11.0.2 官网下载地址 打开eclipse,在菜单 File | New | Project... 新建项目,这里选择Java文件夹下的Java Project 在Next里面对项目进行常规配置,注意以下两个地方

杨唐的博客 2648

javafx eclipse安装

What Is JavaFX?<br />JavaFX is a rich client platform for building cross-device applications and content. Designed to enable easy creation and deployment of rich Internet applications (RIAs) with immersive media and content, the JavaFX platform ensures tha

暮眼蝶 1223

Eclipse 中 JavaFX 项目创建与运行完整教程

本教程的目的是帮助大家学会在 Eclipse 这个开发工具里创建并运行 JavaFX 项目。我们会涵盖从安装必要的软件到最终成功运行一个简单 JavaFX 程序的全过程。无论你是刚刚接触 Java 开发的新手,还是想要尝试 JavaFX 开发的有经验的程序员,都能从这个教程中获得有用的信息。接下来,我们会先介绍一些核心概念,让大家明白 JavaFX 和 Eclipse 是什么。然后详细讲解在 Eclipse 中创建和运行 JavaFX 项目的具体步骤,包括代码示例和解释。

AI开发架构师 1010

javaFx 完整版项目(Spring+SpringMVC+Mybatis)

javaFx开发ERP项目,整合Spring+SpringMVC+Mybatis(SSM)内含数据绑定、表格数据处理以及表单数据,拥有高大上的UI界面

Java JDK环境调试,版本不匹配,提示Error: A JNI error has occurred, please check your installation and try again

参考:【JDK不同版本相互切换】https://www.bilibili.com/video/BV1GF411C7jB?vd_source=6fab38477fb17332a4653ae6511463a8(讲的很详细!在网上差了很久,该试的方法都试了,查看了版本号也一致,已知不知道问题出在哪里。之前安装的一直都是jdk 8,应该安装jdk17。今天cmd运行jar文件的时候,一直报错。往下一看,好像是jdk版本的问题。于是又到网上找怎么切换jdk版本。试了各种方法,终于搞好了。

2302_77261297的博客 435

Jacobi正交多项式在数值分析中的应用与实现

本文深入探讨了Jacobi正交多项式在数值分析中的核心应用与实现。作为最通用的正交多项式族,Jacobi多项式通过参数α和β的调节,可退化为切比雪夫、勒让德等经典多项式,为函数逼近、奇异积分和微分方程求解提供了统一框架。文章重点解析了其在加权高斯积分(高斯-雅可比积分)和谱方法求解微分方程中的关键作用,并提供了基于递归关系和SciPy的稳定高效实现方案,帮助读者掌握这一强大的数值计算工具。

weixin_29306011的博客 258

JavaFX脚本入门

原文地址: http://www.onjava.com/pub/a/onjava/2007/07/27/introduction-to-javafx-script.html        JavaFX是什么?        在2007年春季Sun发布了一个新的框架,叫做JavaFX。这只是一个通用性的名字,因为JavaFX有两个主要的组成部分:脚本(Script)和移动(Mobile),并且,将来

mydeman的学习日志 3500

微信小程序消息推送全攻略:从模板消息到订阅消息的实战避坑指南

本文深入解析微信小程序消息推送机制,对比模板消息、订阅消息与客服消息的核心差异与适用场景。重点提供订阅消息从用户授权设计、前端代码实现到后端稳定发送的完整实战指南,并分享提升消息点击率的文案与运营技巧,帮助开发者构建高效、用户友好的消息推送体系。

b3n4m5q6w7的博客 347

基于PCA的故障诊断方法(matlab)

1. PCA原理分析 PCA的原理主要是将原始数据进行降维。其具体工作原理参照:CodingLabs - PCA的数学原理 2. 数据预处理 训练数据集(只有正样本)为维数据,即有n个采样值,每个采样值有m个特征。 2.1 数据归一化 将数据X针对每个特征归一化为均值为0,均方根为1的数据。 其中: 3. PCA降维 3.1 首先求取协方差矩阵 协方差矩阵的公式为: 计算出来的协方差矩阵为特征m*m维矩阵。 3.2 求取特征值和特征向量 求取协方差矩阵R的特征值.

tangxianyu的博客 1万+

超详细的JavaFX项目的创建、构建、打包教程

最近写了一些JavaFX的程序,并将它们打包,过程中看了不少网上的博客与教程。对于开发经验不多的我来说,解决一个个问题无疑是一个很大的挑战,所幸最后在自己的努力和他人的帮助下完成了整个过程。鉴于JavaFX并非十分流行,如今网络上教程时效性也有很大问题,我写了这样一篇博客,来为准备使用JavaFX来开发程序的朋友们提供一些帮助。

GeekKid的博客 2万+

在windows上,在WSL 2(windows subsystem linux) 里一步步安装vLLM

本文介绍了在Windows系统上通过WSL2配置GPU加速的AI开发环境的完整流程。主要包括四个步骤: 1)安装WSL2并配置Ubuntu环境; 2)安装NVIDIA驱动和CUDA工具包; 3)搭建Python虚拟环境并安装vLLM; 4)验证环境并启动AI模型服务。

2601_96126911的博客 424

JavaFX笔记-Eclipse和Maven创建及打包JavaFX 21项目

使用Eclipse和Maven来构建和打包javaFX 21程序

qq_36666559的博客 3112

TortoiseSVN的安装与使用

TortoiseSVN的安装与应用1、安装1.1、下载TortoiseSVN    点击下载TortoiseSvn1.2、下载汉化包。上面的页面中,找到Chinese, simplified汉化包,点击32位或者64位的Setup,下载汉化包。1.3、安装TortoiseSVN。在选择安装路径页面时要记得勾选“command line client tools”,默认不是勾选的。这里不勾选的话在I...

qq_28566071的博客 4万+

24. SAP UI5 应用如何使用 OData 数据模型

本教程之前的二十三个步骤,使用的数据模型都是 JSON 模型。从本步骤开始,我们要学习另一种非常重要的数据模型:OData 数据模型。 OData 数据模型也是 SAP 产品里广泛使用的数据模型,比如 SAP S/4HANA,SAP CRM Fiori 应用等等,都使用的是 OData 数据模型而不是 JSON 数据模型。 使用 OData 数据模型的典型场景就是,通过 OData 模型提供的 Read API,将远端服务器上存储的数据通过 OData 协议读取到客户端,并显示在 SAP UI5 应用里。.

2007 年 ~ 2025 年,深耕 SAP 技术 18 年 5811

IntelliJ IDEA 创建JavaFX项目运行

目前最新最活跃,并更新比较活跃的就是JavaFX了,他不仅支持CSS让界面能像web端一样美观,又有不少第三方库开发起来还是比较推荐的。这是许多个人和公司的协作努力,目标是生成一个现代、高效且功能齐全的工具包,用于开发富客户端应用程序。在JDK上,Java8已集成了JavaFX模块,但是自动Java9引入模块概念之后,又将JavaFX剥离出来作为单独的模块插件进行维护了。可以看到,运行之后会出现窗口,并且有对应的文字提示,还有按钮进行点击事件,点击Finish之后,工具会帮我们生成基础代码,然后找到。

Jack魏 3719

物联网应用开发教程专栏介绍与说明——列表目录查阅(持续更新)

为方便查阅学习本专栏,特整理专栏介绍与说明及提供列表目录便于查阅。阿齐Archie《物联网应用开发教程》专栏。本专栏为物联网应用开发教程,将更新涵盖常见的WIFI、蓝牙、蜂窝网、以太网、Lora、NB-iot等物联网技术实战应用及详解其技术知识。专栏为技术文章,订阅一个文章即可本专栏内所有文章可看,实战开发,亲测无误,附视频演示效果,会持续更新本专栏。本专栏内有理论篇也有完整实战应用篇。

嵌入式阿齐Archie 2万+

IDEA创建JavaFX项目

Idea创建JavaFX项目

时光下的旅途 3626

2026年全国青少年信息素养大赛算法应用主题赛C++样题及答案解析

2026年全国青少年信息素养大赛算法应用主题赛C++样题

王老师青少年编程 3767

Statistics and Machine Learning Toolbox

Statistics and Machine Learning Toolbox(带书签),MATLAB统计学习工具

JavaFX用IDEA创建新项目流程

摘要:本文详细介绍了JavaFX框架及其开发环境配置。JavaFX是一个现代化的富客户端开发平台,支持CSS样式和FXML界面设计,从JDK11开始需独立安装。文章讲解了使用IDEA创建JavaFX项目的完整流程,包括Maven配置文件(pom.xml)的关键配置说明,重点解析了maven-compiler-plugin和javafx-maven-plugin两个核心插件的作用。最后简要提及了使用jlink生成绿色版应用和jpackage打包EXE安装包的方法,为JavaFX开发者提供了全面的项目搭建指南。

tonight_precious的博客 1872

Probability and Statistics - 4th edition

Probability and Statistics - 4th edition

IDEA创建普通的JavaFx项目(JavaFx工程)

3、点击JavaFx,默认的JDK是1.8(就是java8)选好后点击Next。4、在新项目页面输入JFXCProject,即可,最后点击Finish即可。Java环境:java8(不收费还稳定,最最主要的是包含JavaFx)1、在打开IDEA环境的时候,File->New->Project。开发IDE:idea2020(高低无所谓就是点操作不同)2、在Project界面中找到JavaFx项目。5、点击NewWindow后项目创建完成。操作系统:windows11。

zy0412326的专栏 1623

visio安装包

Microsoft Office Visio 是一款专业的制图软件。利用经过更新的形状、协作工具和数据链接图表,创建专业级图表以简化复杂的信息。

假人有限元模型

假人模型,车辆碰撞假人有限元模型,适合做乘员安全的研究者利用

使用IDEA+JavaFx SDK创建JavaFx项目(非模块化)

目录 二、使用 IDEA + JavaFx SDK 创建JavaFx项目(Non-modular) 二、使用 IDEA + JavaFx SDK 创建JavaFx项目(Non-modular) 项目结构如图 JavaFx SDK官网下载地址:下载地址,(此处使用SDK版本11.0.2) 进入 File | New | Project... 左侧选择Java,右侧选择JDK版本(此处以11为例),点击Next下一步。 使用模板创建,这里不使用模板,直接点击下一步。 输入项目名称(

杨唐的博客 1929

javafx 创建项目_使用JavaFX快速创建应用程序

总览 JavaFX是基于Java的平台,用于构建可在台式机或移动设备上运行的富Internet应用程序(RIA)。 用JavaFX构建的应用程序是基于Java字节码的,因此它们可以在装有Java运行时环境的任何桌面上运行,也可以在装有Java2 ME的任何移动设备上运行。 JavaFX使GUI编程非常容易。 它使用声明性语法并提供动画支持。 在本文中,学习如何开始使用JavaFX来构建...

cuyi7076的博客 315

idea javafx添加maven,如何在IntelliJ IDEA中创建JavaFX Maven项目?

How can I open a JavaFX Maven project from scratch in IntelliJ IDEA? As there is no difference between a Java project and a JavaFx project, I want to open a dedicated JavaFX project (Selection JavaFX ...

weixin_39798626的博客 248

Idea-maven项目创建及javafx运行案例

但是在idea中有小技巧,先填写依赖包的名称,然后在填写另外两个时候先按空格,idea就会自动显示一些版本,有可能准确有可能不准确(比如我的mysql版本是8,但是idea给我显示的链接依赖包的版本就只有5的),如果不准确要自己查询,然后输进去。以上的问题纯粹是因为我新建的是普通项目,而不是Java FX项目,如果新建的是Java FX项目,那么idea会自动给你生成相应的需要的pom.xml文件,并且运行也是正常的。添加的时候有一个麻烦的点,要根据自己使用的软件的版本来说明依赖包的版本。

ahahayaa的博客 5497
上一篇: javafx eclipse安装
下一篇: swt控件的使用
stone1116
博客等级 码龄20年 76粉丝 86原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值