I am using the latest version of ControlsFX
for JavaFX
, and I am encountering a very strange bug.. and I'm hoping someone has found out a "fix" for it.
I've not created a simple test case for this, but if I create a custom Dialog
, add a GridPane
on it, add a SegmentedButton
to the GridPane
, the whole Dialog loses it's borders!
This occurs only on the first time I open the dialog. If I re-create the Dialog everything works just fine*
I'd really hate to dump the SegmentedButton due to a glitch like this.. has anyone else encountered this issue?
EDIT, here's a simple test that should demonstrate the bug. The effect is even worse now, in this test. It seems to be some sort of a clipping bug.
import javafx.application.Application;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.control.ToggleButton;
import javafx.stage.Stage;
import org.controlsfx.control.SegmentedButton;
import org.controlsfx.dialog.Dialog;
public class DialogTest extends Application {
public static void main(String[] args) {
launch(args);
}
@Override
public void start(Stage primaryStage) throws Exception {
Group root = new Group();
Scene scene = new Scene(root);
primaryStage.setScene(scene);
primaryStage.show();
Dialog dlg = new Dialog(primaryStage, "Test Dialog");
dlg.setMasthead("Dialog test");
dlg.setIconifiable(false);
dlg.setResizable(false);
SegmentedButton seg = new SegmentedButton();
seg.getButtons().add(new ToggleButton("Button 1"));
seg.getButtons().add(new ToggleButton("Button 2"));
seg.getButtons().add(new ToggleButton("Button 3"));
seg.getButtons().add(new ToggleButton("Button 4"));
seg.getButtons().add(new ToggleButton("Button 5"));
dlg.setContent(seg);
dlg.show();
}
}