-
Bug
-
Resolution: Cannot Reproduce
-
P3
-
8
-
jdk1.8.0b86, Ubuntu 12.04
To reproduce click the "Button" button.
package splitmenubuttonsample;
import com.sun.javafx.runtime.VersionInfo;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.MenuItem;
import javafx.scene.control.SplitMenuButton;
import javafx.scene.layout.HBox;
import javafx.stage.Stage;
public class SplitMenuButtonSample extends Application {
public static void main(String[] args) {
launch(args);
}
@Override
public void start(Stage stage) throws Exception {
HBox hb = new HBox(5);
SplitMenuButton smb = new SplitMenuButton();
smb.setText("Menu button");
smb.getItems().addAll(new MenuItem("test1"), new MenuItem("test2"));
hb.getChildren().add(smb);
Button btn = new Button("Button");
hb.getChildren().add(btn);
Scene scene = new Scene(hb);
stage.setTitle(VersionInfo.getRuntimeVersion());
stage.setScene(scene);
stage.show();
}
}
package splitmenubuttonsample;
import com.sun.javafx.runtime.VersionInfo;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.MenuItem;
import javafx.scene.control.SplitMenuButton;
import javafx.scene.layout.HBox;
import javafx.stage.Stage;
public class SplitMenuButtonSample extends Application {
public static void main(String[] args) {
launch(args);
}
@Override
public void start(Stage stage) throws Exception {
HBox hb = new HBox(5);
SplitMenuButton smb = new SplitMenuButton();
smb.setText("Menu button");
smb.getItems().addAll(new MenuItem("test1"), new MenuItem("test2"));
hb.getChildren().add(smb);
Button btn = new Button("Button");
hb.getChildren().add(btn);
Scene scene = new Scene(hb);
stage.setTitle(VersionInfo.getRuntimeVersion());
stage.setScene(scene);
stage.show();
}
}