小编oum*_*iop的帖子

如何在JavaFX中定位按钮

我正在使用NetBeans IDE 8.2 for JavaFX.我已经知道,为了改变按钮的位置,我需要使用setLayoutX/Y. 我试过这个,对按钮没有任何影响.这是我的代码:

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package javafxapplication2;

import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;

/**
 *
 * @author coolDawg1234
 */
public class JavaFXApplication2 extends Application {

    @Override
    public void start(Stage primaryStage) {

        String x = "1";
        String y = "0"; …
Run Code Online (Sandbox Code Playgroud)

layout netbeans javafx button java-8

1
推荐指数
1
解决办法
2532
查看次数

标签 统计

button ×1

java-8 ×1

javafx ×1

layout ×1

netbeans ×1