widgetSelected() and different OS platform behaviors

こ雲淡風輕ζ 提交于 2019-12-11 04:08:30

问题


I have this Java code where I implement a selectionListener. While it works great on Windows, surprisingly, it doesn't work on Linux (Debian 9.9, Cinnamon) and when I debug, the println code is never reached. Any idea why it would work on one platform (Win?) but not on another (Linux) ?

        DateTime dt = new DateTime(container, SWT.TIME | SWT.MEDIUM | SWT.BORDER);
        FormToolkit tk =new FormToolkit(parent.getDisplay());
        tk.adapt(dt, true, false);
        dt.addSelectionListener(new SelectionAdapter() {
                    @Override
                    public void widgetSelected(final SelectionEvent e) {
                           System.out.println("Event caught!");
}

回答1:


Per my bug report, this issue is fixed in Eclipse 2019-09



来源:https://stackoverflow.com/questions/56213920/widgetselected-and-different-os-platform-behaviors

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!