java.lang.reflect.InvocationTargetException
package example;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.control.TextField;
import javafx.scene.layout.HBox;
import javafx.stage.Stage;
public class b extends Application {
public static void main(String[] args) {
launch(args);
}
@Override
public void start(Stage primaryStage) {
primaryStage.setTitle("example");
Label l = new Label("请选择第1题的答案:");
TextField textField = new TextField ();
HBox hb = new HBox();
hb.getChildren().addAll(l, textField);
hb.setSpacing(100);
Scene s = new Scene(l,200,100);
primaryStage.show();
primaryStage.setScene(s);
}
}