我在 netbeans 中使用 javafx 场景构建器创建了一个 fxml 文件。
如何将 netbeans 中的 .fxml 文件转换为 .java?有什么程序可以转换它吗?
我在 fxml 方面不是很好,所以我想使用 .java 文件来编写我的 javafx 应用程序。
请帮我。谢谢
package webviewbrowser;
import java.util.List;
import javafx.application.Application;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.geometry.HPos;
import javafx.geometry.Insets;
import javafx.geometry.VPos;
import javafx.scene.Node;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.TextField;
import javafx.scene.layout.ColumnConstraints;
import javafx.scene.layout.GridPane;
import javafx.scene.layout.Pane;
import javafx.scene.layout.Priority;
import javafx.scene.layout.VBox;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
import javafx.stage.Stage;
public class WebViewBrowser extends Application {
@Override public void start(Stage primaryStage) throws Exception {
Pane root = new WebViewPane();
primaryStage.setScene(new Scene(root, 1024, 768));
primaryStage.show();
}
public static void main(String[] args) {
launch(args);
}
/**
* Create …Run Code Online (Sandbox Code Playgroud)