Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NotificationPane not working with default constructor #46

Closed
JonathanGiles opened this issue Jul 16, 2013 · 2 comments
Closed

NotificationPane not working with default constructor #46

JonathanGiles opened this issue Jul 16, 2013 · 2 comments
Labels
bug Something isn't working
Milestone

Comments

@JonathanGiles
Copy link
Collaborator

Original report by Hendrik Ebbers (Bitbucket: hendrikebbers, GitHub: hendrikebbers).


When creating the NotificationPane with
notificationPane = new NotificationPane();
a exception is thrown when the scene will be shown.

Workaround: Everything is fine when I add a dummy content node:
notificationPane = new NotificationPane(new StackPane());

Here is the StackTrace:

Caused by: java.lang.NullPointerException: Children: child node is null: parent = NotificationPane@736b303e[styleClass=notification-pane]
at javafx.scene.Parent$2.onProposedChange(Parent.java:423)
at com.sun.javafx.collections.VetoableListDecorator.setAll(VetoableListDecorator.java:115)
at com.sun.javafx.collections.VetoableListDecorator.setAll(VetoableListDecorator.java:110)
at impl.org.controlsfx.skin.NotificationPaneSkin.updateContent(NotificationPaneSkin.java:106)
at impl.org.controlsfx.skin.NotificationPaneSkin.(NotificationPaneSkin.java:69)
at org.controlsfx.control.NotificationPane.createDefaultSkin(NotificationPane.java:248)
at javafx.scene.control.Control.impl_processCSS(Control.java:869)
at javafx.scene.Parent.impl_processCSS(Parent.java:1204)
at javafx.scene.Node.processCSS(Node.java:8545)
at javafx.scene.Scene.doCSSPass(Scene.java:543)
at javafx.scene.Scene.preferredSize(Scene.java:1581)
at javafx.scene.Scene.impl_preferredSize(Scene.java:1648)
at javafx.stage.Window$9.invalidated(Window.java:730)
at javafx.beans.property.BooleanPropertyBase.markInvalid(BooleanPropertyBase.java:108)
at javafx.beans.property.BooleanPropertyBase.set(BooleanPropertyBase.java:142)
at javafx.stage.Window.setShowing(Window.java:796)
at javafx.stage.Window.show(Window.java:811)
at javafx.stage.Stage.show(Stage.java:243)
at com.guigarage.testimpl.TestMainApplication.start(TestMainApplication.java:11)
at com.sun.javafx.application.LauncherImpl$5.run(LauncherImpl.java:810)
at com.sun.javafx.application.PlatformImpl$6.run(PlatformImpl.java:260)
at com.sun.javafx.application.PlatformImpl$5$1.run(PlatformImpl.java:226)
at com.sun.javafx.application.PlatformImpl$5$1.run(PlatformImpl.java:223)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl$5.run(PlatformImpl.java:223)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
Exception running application com.guigarage.testimpl.TestMainApplication

Java Version:
java version "1.8.0-ea"
Java(TM) SE Runtime Environment (build 1.8.0-ea-b94)
Java HotSpot(TM) 64-Bit Server VM (build 25.0-b36, mixed mode)

@JonathanGiles
Copy link
Collaborator Author

Original comment by Jonathan Giles (Bitbucket: JonathanGiles, GitHub: JonathanGiles).


Thanks for the bug report, I'll fix it ASAP.

@JonathanGiles
Copy link
Collaborator Author

Original comment by Jonathan Giles (Bitbucket: JonathanGiles, GitHub: JonathanGiles).


The NotificationPane is intended to wrap some content, which is either passed in to the constructor or to the setContent(Node) method. I've updated the skin code to not throw exceptions when the content is null, but of course this makes the NotificationPane useless :-)

@JonathanGiles JonathanGiles added major bug Something isn't working labels Dec 29, 2018
@JonathanGiles JonathanGiles added this to the Final Release milestone Dec 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant