Text cut off in new Dialogs API

Robert Lichtenberger r.lichtenberger at gmail.com
Mon Nov 17 10:14:33 UTC 2014

I hope this is the right place to post bugs to. If not, please accept my 
apologies and advise where to post bugs.

I've just tried the upcoming (u40) new Dialogs API (good job, BTW, 
looks/feels great) and noticed that long content texts will be cut off 

Here's an example:

import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.Scene;
import javafx.scene.control.Alert;
import javafx.scene.control.Alert.AlertType;
import javafx.scene.control.Menu;
import javafx.scene.control.MenuBar;
import javafx.scene.control.MenuItem;
import javafx.scene.input.KeyCombination;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;

public class DialogCutOffBug extends Application {

     public DialogCutOffBug() {

     public void start(Stage stage) throws Exception {
         stage.setTitle("Menu Sample");
         Scene scene = new Scene(new VBox(), 400, 350);

         MenuBar menuBar = new MenuBar();

         // --- Menu File
         Menu menuFile = new Menu("File");

         MenuItem test = new MenuItem("Open Dialog");
         test.setOnAction(new EventHandler<ActionEvent>() {
             public void handle(ActionEvent t) {
                 Alert alert = new Alert(AlertType.INFORMATION);
                 alert.setTitle("Information Dialog");
                 alert.setContentText("Whenever I start to use dialogs, 
there is certain verboseness involved, which will make the dialog 
basically useless, however JavaFX should not produce ellipses here, 
because the Dialog text should always be displayed in Full");


         ((VBox) scene.getRoot()).getChildren().addAll(menuBar);


     public static void main(String[] args) {

It looks like this (red line added by me, of course):

Best regards,
Robert Lichtenberger

More information about the openjfx-dev mailing list