-
Bug
-
Resolution: Unresolved
-
P4
-
8, jfx17
Run this sample code :
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.MenuButton;
import javafx.scene.layout.HBox;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;
public class MenuButtontest extends Application {
public static void main(String[] args) {
launch(args);
}
@Override public void start(Stage stage) throws Exception {
Button button = new Button("Button");
button.setStyle("-fx-text-fill:white;");
MenuButton menuButton = new MenuButton("MenuButton");
menuButton.setStyle("-fx-text-fill:white;");
VBox vbox = new VBox(10, button, menuButton);
Scene scene = new Scene(vbox, 200, 200);
stage.setScene(scene);
stage.show();
}
}
You will see that the Label of the MenuButton is not white. If you use a simple "Button", the text will be white.
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.MenuButton;
import javafx.scene.layout.HBox;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;
public class MenuButtontest extends Application {
public static void main(String[] args) {
launch(args);
}
@Override public void start(Stage stage) throws Exception {
Button button = new Button("Button");
button.setStyle("-fx-text-fill:white;");
MenuButton menuButton = new MenuButton("MenuButton");
menuButton.setStyle("-fx-text-fill:white;");
VBox vbox = new VBox(10, button, menuButton);
Scene scene = new Scene(vbox, 200, 200);
stage.setScene(scene);
stage.show();
}
}
You will see that the Label of the MenuButton is not white. If you use a simple "Button", the text will be white.