Run code, press alt+M, select test menu, press enter, press tab to focus textfield not working
code:
package teste;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Menu;
import javafx.scene.control.MenuBar;
import javafx.scene.control.MenuItem;
import javafx.scene.control.TextField;
import javafx.scene.layout.BorderPane;
import javafx.scene.layout.FlowPane;
import javafx.stage.Stage;
public class MenuBarTest extends Application {
@Override
public void start(final Stage stage) throws Exception {
BorderPane root = new BorderPane();
MenuBar menuBar = new MenuBar();
Menu menu = new Menu("_Menu1");
menu.getItems().add(new MenuItem("Teste"));
menuBar.getMenus().add(menu);
root.setTop(menuBar);
//after show menu (by mnemonic) tab and arrows keys lock
FlowPane p1 = new FlowPane();
p1.getChildren().addAll(new TextField("1-campo1"),new TextField("1-campo2"),new TextField("1-campo3"));
root.setBottom(p1);
Scene scene = new Scene(root);
stage.setScene(scene);
stage.setTitle("TEST");
stage.setWidth(500);
stage.setHeight(500);
stage.show();
}
public static void main(String[] args) {
launch(args);
}
}
code:
package teste;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Menu;
import javafx.scene.control.MenuBar;
import javafx.scene.control.MenuItem;
import javafx.scene.control.TextField;
import javafx.scene.layout.BorderPane;
import javafx.scene.layout.FlowPane;
import javafx.stage.Stage;
public class MenuBarTest extends Application {
@Override
public void start(final Stage stage) throws Exception {
BorderPane root = new BorderPane();
MenuBar menuBar = new MenuBar();
Menu menu = new Menu("_Menu1");
menu.getItems().add(new MenuItem("Teste"));
menuBar.getMenus().add(menu);
root.setTop(menuBar);
//after show menu (by mnemonic) tab and arrows keys lock
FlowPane p1 = new FlowPane();
p1.getChildren().addAll(new TextField("1-campo1"),new TextField("1-campo2"),new TextField("1-campo3"));
root.setBottom(p1);
Scene scene = new Scene(root);
stage.setScene(scene);
stage.setTitle("TEST");
stage.setWidth(500);
stage.setHeight(500);
stage.show();
}
public static void main(String[] args) {
launch(args);
}
}