zoukankan      html  css  js  c++  java
  • JavaFX 2 Dialogs

    http://edu.makery.ch/blog/2012/10/30/javafx-2-dialogs/

    ————————————————————————————————————————————

    When programming a graphical user interface (GUI) there are occasions where you’ll need a simple popup dialog to communicate with the user. In Swing (the predecessor of JavaFX) there is a convenient class called JOptionPane for such dialogs. A similar class doesn’t exist in JavaFX 2.x (yet).

    Fortunately, the authors of JavaFX published some user interface controls they are currently working on. Those controls might be added in a future version of JavaFX.

    One of those ui controls is a class called Dialogs.java which is exactly what we need.

    How To Use the Dialogs

    1. Download the newest javafx-dialogs-x.x.x.jar file from my GitHub Page. I put all necessary classes, css files and images inside this jar.
    2. Add the jar file to your project (usually inside a lib subfolder).
    3. Add the jar file to the project’s classpath: In Eclipse right-click on the jar file | Build Path | Add to Build Path. Now Eclipse knows about the library.
    4. Then add one of the following lines:
  • 相关阅读:
    63.Unique Paths II
    Java中的访问修饰符
    Java語言
    JRE与JDK
    Linux中ls命令详解
    硬盘主分区和拓展分区
    java中的静态初始化块
    java中的静态变量
    java中的静态方法
    java构造方法
  • 原文地址:https://www.cnblogs.com/cuizhf/p/3243333.html
Copyright © 2011-2022 走看看