Start App, click in on textbox, press Tab key
App:
public class ControlsApp extends Application
{
public static void main(String[] args) {
Launcher.launch(ControlsApp.class, args);
}
@SuppressWarnings("unchecked")
@Override
public void start(Stage pStage)
{
pStage.setTitle("Hello Controls");
Text text = new Text();
text.setLayoutX(10);
text.setLayoutY(40);
text.setContent("Text content is wrapped or is not wrapped?");
TextBox tbox = new TextBox();
tbox.setText("TextBox with content.... 1234!");
tbox.setEditable(false);
tbox.setFocusTraversable(false);
Group group = new Group();
group.getChildren().add(text);
group.getChildren().add(tbox);
Scene scene = new Scene(group);
pStage.setScene(scene);
pStage.setVisible(true);
pStage.setFocused(true);
}
}
Exception:
java.lang.NullPointerException
at javafx.scene.Scene.traverse(Scene.java:1152)
at javafx.scene.Node.impl_traverse(Node.java:4665)
at com.sun.javafx.scene.control.behavior.BehaviorBase.traverse(BehaviorBase.java:184)
at com.sun.javafx.scene.control.behavior.BehaviorBase.traverseNext(BehaviorBase.java:224)
at com.sun.javafx.scene.control.behavior.BehaviorBase.callAction(BehaviorBase.java:174)
at com.sun.javafx.scene.control.behavior.TextInputControlBehavior.callAction(TextInputControlBehavior.java:199)
at com.sun.javafx.scene.control.behavior.TextBoxBehavior.callAction(TextBoxBehavior.java:69)
at com.sun.javafx.scene.control.behavior.BehaviorBase.callActionForEvent(BehaviorBase.java:154)
at com.sun.javafx.scene.control.behavior.TextInputControlBehavior.callActionForEvent(TextInputControlBehavior.java:205)
at com.sun.javafx.scene.control.behavior.BehaviorBase$1.handle(BehaviorBase.java:116)
at com.sun.javafx.scene.control.behavior.BehaviorBase$1.handle(BehaviorBase.java:114)
at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:55)
at com.sun.javafx.event.DefaultEventDispatcher.dispatchBubblingEvent(DefaultEventDispatcher.java:173)
at com.sun.javafx.event.DefaultEventDispatcher.dispatchBubblingEvent(DefaultEventDispatcher.java:157)
at com.sun.javafx.event.DefaultEventDispatcher.dispatchEvent(DefaultEventDispatcher.java:120)
at javafx.scene.Node$54.dispatchEvent(Node.java:4972)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:92)
at com.sun.javafx.event.EventRedirector.dispatchEvent(EventRedirector.java:93)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:92)
at javafx.event.Event.fireEventImpl(Event.java:172)
at javafx.event.Event.fireEvent(Event.java:162)
at javafx.scene.Scene$KeyHandler.process(Scene.java:2271)
at javafx.scene.Scene$KeyHandler.access$1300(Scene.java:2201)
at javafx.scene.Scene.impl_processKeyEvent(Scene.java:1194)
at javafx.scene.Scene$ScenePeerListener.keyEvent(Scene.java:1578)
at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleKeyEvent(GlassViewEventHandler.java:53)
at com.sun.glass.ui.View.handleKeyEvent(View.java:252)
at com.sun.glass.ui.View.notifyKey(View.java:511)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.access$100(WinApplication.java:14)
at com.sun.glass.ui.win.WinApplication$1.run(WinApplication.java:31)
at java.lang.Thread.run(Thread.java:619)
App:
public class ControlsApp extends Application
{
public static void main(String[] args) {
Launcher.launch(ControlsApp.class, args);
}
@SuppressWarnings("unchecked")
@Override
public void start(Stage pStage)
{
pStage.setTitle("Hello Controls");
Text text = new Text();
text.setLayoutX(10);
text.setLayoutY(40);
text.setContent("Text content is wrapped or is not wrapped?");
TextBox tbox = new TextBox();
tbox.setText("TextBox with content.... 1234!");
tbox.setEditable(false);
tbox.setFocusTraversable(false);
Group group = new Group();
group.getChildren().add(text);
group.getChildren().add(tbox);
Scene scene = new Scene(group);
pStage.setScene(scene);
pStage.setVisible(true);
pStage.setFocused(true);
}
}
Exception:
java.lang.NullPointerException
at javafx.scene.Scene.traverse(Scene.java:1152)
at javafx.scene.Node.impl_traverse(Node.java:4665)
at com.sun.javafx.scene.control.behavior.BehaviorBase.traverse(BehaviorBase.java:184)
at com.sun.javafx.scene.control.behavior.BehaviorBase.traverseNext(BehaviorBase.java:224)
at com.sun.javafx.scene.control.behavior.BehaviorBase.callAction(BehaviorBase.java:174)
at com.sun.javafx.scene.control.behavior.TextInputControlBehavior.callAction(TextInputControlBehavior.java:199)
at com.sun.javafx.scene.control.behavior.TextBoxBehavior.callAction(TextBoxBehavior.java:69)
at com.sun.javafx.scene.control.behavior.BehaviorBase.callActionForEvent(BehaviorBase.java:154)
at com.sun.javafx.scene.control.behavior.TextInputControlBehavior.callActionForEvent(TextInputControlBehavior.java:205)
at com.sun.javafx.scene.control.behavior.BehaviorBase$1.handle(BehaviorBase.java:116)
at com.sun.javafx.scene.control.behavior.BehaviorBase$1.handle(BehaviorBase.java:114)
at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:55)
at com.sun.javafx.event.DefaultEventDispatcher.dispatchBubblingEvent(DefaultEventDispatcher.java:173)
at com.sun.javafx.event.DefaultEventDispatcher.dispatchBubblingEvent(DefaultEventDispatcher.java:157)
at com.sun.javafx.event.DefaultEventDispatcher.dispatchEvent(DefaultEventDispatcher.java:120)
at javafx.scene.Node$54.dispatchEvent(Node.java:4972)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:92)
at com.sun.javafx.event.EventRedirector.dispatchEvent(EventRedirector.java:93)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:92)
at javafx.event.Event.fireEventImpl(Event.java:172)
at javafx.event.Event.fireEvent(Event.java:162)
at javafx.scene.Scene$KeyHandler.process(Scene.java:2271)
at javafx.scene.Scene$KeyHandler.access$1300(Scene.java:2201)
at javafx.scene.Scene.impl_processKeyEvent(Scene.java:1194)
at javafx.scene.Scene$ScenePeerListener.keyEvent(Scene.java:1578)
at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleKeyEvent(GlassViewEventHandler.java:53)
at com.sun.glass.ui.View.handleKeyEvent(View.java:252)
at com.sun.glass.ui.View.notifyKey(View.java:511)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.access$100(WinApplication.java:14)
at com.sun.glass.ui.win.WinApplication$1.run(WinApplication.java:31)
at java.lang.Thread.run(Thread.java:619)