-
Bug
-
Resolution: Fixed
-
P4
-
7u6
public class Testit extends Application {
@Override
public void start(Stage primaryStage) {
ToggleGroup g = new ToggleGroup();
RadioMenuItem item = new RadioMenuItem("Test 1");
g.getToggles().add(item);
}
public static void main(String[] args) {
launch(args);
}
}
Leads to an IAE:
Exception in thread "main" java.lang.RuntimeException: Exception in Application start method
at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:403)
at com.sun.javafx.application.LauncherImpl.access$000(LauncherImpl.java:47)
at com.sun.javafx.application.LauncherImpl$1.run(LauncherImpl.java:115)
at java.lang.Thread.run(Thread.java:680)
Caused by: java.lang.IllegalArgumentException: Duplicate toggles are not allow in a ToggleGroup.
at javafx.scene.control.ToggleGroup$1.onProposedChange(ToggleGroup.java:63)
at com.sun.javafx.collections.VetoableObservableList.add(VetoableObservableList.java:165)
at com.sun.javafx.collections.ObservableListWrapper.add(ObservableListWrapper.java:144)
at javafx.scene.control.RadioMenuItem$1.invalidated(RadioMenuItem.java:151)
at javafx.beans.property.ObjectPropertyBase.markInvalid(ObjectPropertyBase.java:129)
at javafx.beans.property.ObjectPropertyBase.set(ObjectPropertyBase.java:163)
at javafx.scene.control.RadioMenuItem.setToggleGroup(RadioMenuItem.java:134)
at javafx.scene.control.ToggleGroup$1.onChanged(ToggleGroup.java:87)
at com.sun.javafx.collections.VetoableObservableList.callObservers(VetoableObservableList.java:83)
at com.sun.javafx.collections.ObservableListWrapper.add(ObservableListWrapper.java:154)
at com.sun.javafx.collections.VetoableObservableList.add(VetoableObservableList.java:167)
at com.sun.javafx.collections.ObservableListWrapper.add(ObservableListWrapper.java:144)
at test.Testit.start(Testit.java:16)
at com.sun.javafx.application.LauncherImpl$5.run(LauncherImpl.java:319)
at com.sun.javafx.application.PlatformImpl$5.run(PlatformImpl.java:206)
at com.sun.javafx.application.PlatformImpl$4.run(PlatformImpl.java:173)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:76)
@Override
public void start(Stage primaryStage) {
ToggleGroup g = new ToggleGroup();
RadioMenuItem item = new RadioMenuItem("Test 1");
g.getToggles().add(item);
}
public static void main(String[] args) {
launch(args);
}
}
Leads to an IAE:
Exception in thread "main" java.lang.RuntimeException: Exception in Application start method
at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:403)
at com.sun.javafx.application.LauncherImpl.access$000(LauncherImpl.java:47)
at com.sun.javafx.application.LauncherImpl$1.run(LauncherImpl.java:115)
at java.lang.Thread.run(Thread.java:680)
Caused by: java.lang.IllegalArgumentException: Duplicate toggles are not allow in a ToggleGroup.
at javafx.scene.control.ToggleGroup$1.onProposedChange(ToggleGroup.java:63)
at com.sun.javafx.collections.VetoableObservableList.add(VetoableObservableList.java:165)
at com.sun.javafx.collections.ObservableListWrapper.add(ObservableListWrapper.java:144)
at javafx.scene.control.RadioMenuItem$1.invalidated(RadioMenuItem.java:151)
at javafx.beans.property.ObjectPropertyBase.markInvalid(ObjectPropertyBase.java:129)
at javafx.beans.property.ObjectPropertyBase.set(ObjectPropertyBase.java:163)
at javafx.scene.control.RadioMenuItem.setToggleGroup(RadioMenuItem.java:134)
at javafx.scene.control.ToggleGroup$1.onChanged(ToggleGroup.java:87)
at com.sun.javafx.collections.VetoableObservableList.callObservers(VetoableObservableList.java:83)
at com.sun.javafx.collections.ObservableListWrapper.add(ObservableListWrapper.java:154)
at com.sun.javafx.collections.VetoableObservableList.add(VetoableObservableList.java:167)
at com.sun.javafx.collections.ObservableListWrapper.add(ObservableListWrapper.java:144)
at test.Testit.start(Testit.java:16)
at com.sun.javafx.application.LauncherImpl$5.run(LauncherImpl.java:319)
at com.sun.javafx.application.PlatformImpl$5.run(PlatformImpl.java:206)
at com.sun.javafx.application.PlatformImpl$4.run(PlatformImpl.java:173)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:76)