When DialogPane#getButtonTypes().setAll() is called twice with the same argument(s), DialogPane#lookupButton does not return the node which is shown inside the button bar. This is due DialogPane adding two list change listeners to 'buttons' (#getButtonTypes). They have the wrong order, which will result in the button bar not changing at all, but the 'buttonNodes' list will recreate the dialog button, which is not shown. Finally, this will make DialogPane#lookupButton returning the 'wrong' button, which is in fact not used inside the dialog button bar.
------------- Commit messages: - Fix lookupButton does return wrong Node Changes: https://git.openjdk.java.net/jfx/pull/432/files Webrev: https://webrevs.openjdk.java.net/?repo=jfx&pr=432&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8263807 Stats: 53 lines in 2 files changed: 45 ins; 3 del; 5 mod Patch: https://git.openjdk.java.net/jfx/pull/432.diff Fetch: git fetch https://git.openjdk.java.net/jfx pull/432/head:pull/432 PR: https://git.openjdk.java.net/jfx/pull/432