java javafx 场景生成器 2.0 中的文件选择器在哪里?我找不到

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/25107291/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-11-02 07:21:22  来源:igfitidea点击:

Where is filechooser in javafx scene builder 2.0? I can't find it

javajavafxscenebuilder

提问by Passatizhi

I have java jdk 7.65, sdk 7.65. Where is filechooser in javafx scene builder 2.0? I can't find it.

我有 java jdk 7.65,sdk 7.65。javafx 场景生成器 2.0 中的文件选择器在哪里?我找不到。

回答by James_D

SceneBuilder is for building a Scene graph, i.e. for creating nodes and adding them to a root container that is intended to be added to a Scene.

SceneBuilder 用于构建场景图,即用于创建节点并将它们添加到打算添加到Scene.

FileChooseris not a Node; it cannot be placed in Scene graph; so it really wouldn't make sense to include it in SceneBuilder. The typical use of a FileChooseris that it's shown in response to the user action, such as pressing a button. This would be done in a handler method, not in the construction of the UI.

FileChooser不是Node; 不能放置在场景图中;所以将它包含在 SceneBuilder 中真的没有意义。a 的典型用途FileChooser是显示它以响应用户操作,例如按下按钮。这将在处理程序方法中完成,而不是在 UI 的构造中完成。

In other words, it's not really clear what you would do with a FileChooserif it were available in SceneBuilder.

换句话说,FileChooser如果它在 SceneBuilder 中可用,你会用它做什么并不是很清楚。

回答by DavidPostill

Where is filechooser in javafx?

javafx中的文件选择器在哪里?

The FileChooser class is located in the javafx.stage package.

FileChooser 类位于 javafx.stage 包中。



File Chooser

文件选择器

This chapter explains how to use the FileChooser class to enable users to navigate the file system. The samples provided in this chapter explain how to open one or several files, configure a file chooser dialog window, and save the application content.

Unlike other user interface component classes, the FileChooser class does not belong to the javafx.scene.controls package. However, this class deserves to be mentioned in the JavaFX UI Controls tutorial, because it supports one of the typical GUI application functions: file system navigation.

The FileChooser class is located in the javafx.stage package along with the other basic root graphical elements, such as Stage, Window, and Popup.

本章解释了如何使用 FileChooser 类使用户能够导航文件系统。本章提供的示例解释了如何打开一个或多个文件、配置文件选择器对话窗口以及保存应用程序内容。

与其他用户界面组件类不同,FileChooser 类不属于 javafx.scene.controls 包。但是,这个类在 JavaFX UI Controls 教程中值得一提,因为它支持典型的 GUI 应用程序功能之一:文件系统导航。

FileChooser 类与其他基本根图形元素(例如 Stage、Window 和 Popup)一起位于 javafx.stage 包中。

Source Using JavaFX UI Controls

使用 JavaFX UI 控件的源代码