Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/81.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Notifications ControlsFX通知图形已损坏_Notifications_Tableview_Javafx 8_Controlsfx - Fatal编程技术网

Notifications ControlsFX通知图形已损坏

Notifications ControlsFX通知图形已损坏,notifications,tableview,javafx-8,controlsfx,Notifications,Tableview,Javafx 8,Controlsfx,我正在使用ControlsFX通知显示一组消息。文本对我来说不是完美的方式,所以我在TableView中显示数据 import org.controlsfx.control.Notifications; ...... TableView<NotificationModel> notificationTable = new TableView(); ...... Notifications notification = Notifications.create()

我正在使用ControlsFX通知显示一组消息。文本对我来说不是完美的方式,所以我在TableView中显示数据

 import org.controlsfx.control.Notifications;
 ......


 TableView<NotificationModel> notificationTable = new TableView();

 ......

 Notifications notification = Notifications.create()
            .title("Transaction Notifications")
            .text(null)
            .graphic(notificationTable)
            .position(Pos.BOTTOM_RIGHT)
            .hideAfter(Duration.minutes(1));

 notification.show();
导入org.controlsfx.control.Notifications;
......
TableView notificationTable=新建TableView();
......
通知通知=通知。创建()
.标题(“交易通知”)
.text(空)
.图形(通知表)
.位置(位置底部\右侧)
.hideAfter(持续时间.分钟(1));
notification.show();
在正常情况下,通知如下所示:

但大多数情况下,通知似乎已损坏,如下所示。它似乎显示>1个通知,彼此重叠

我测试了ControlsFX示例jar文件,选择了“图形选项:全部替换图形”。它表现出同样的腐败行为


当用图形显示非文本通知时,它看起来像来自ControlsFX的错误。有人面临类似的问题吗?我正在开发macOS Sierra 10.12.2,ControlsFX 8.40.12

我通过在AnchorPane中包装TableView,然后将其设置为通知图形,解决了我的问题

  AnchorPane anchorPane = new AnchorPane(notificationTable);

  Notifications notification = Notifications.create()
          .title("Transaction Notifications")
          .text(null)
          .graphic(anchorPane)
          .position(Pos.BOTTOM_RIGHT)
          .hideAfter(Duration.minutes(1));

  notification.show();
我从这里得到了提示: