在Java 9中使用CcontrolsFX的SpreadsheetView [英] Using CcontrolsFX's SpreadsheetView in Java 9

查看:228
本文介绍了在Java 9中使用CcontrolsFX的SpreadsheetView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个用ControlsFX 8.40.14用Java 8编写的应用程序.

I've got an application written in Java 8 with ControlsFX 8.40.14.

我在Java 9(准确地说是jdk-9.0.1)下运行该应用程序,当该应用程序尝试显示SpreadsheetView组件时出现以下异常.

I run the app under Java 9 (jdk-9.0.1 to be precise) and I got the following exception when the app tries to display SpreadsheetView component.

Exception in thread "JavaFX Application Thread" java.lang.NoSuchMethodError: javafx.scene.control.TableColumn.impl_setReorderable(Z)V
    at org.controlsfx.control.spreadsheet.SpreadsheetView.getTableColumn(SpreadsheetView.java:2216)
    at org.controlsfx.control.spreadsheet.SpreadsheetView.setGrid(SpreadsheetView.java:1162)
    at org.controlsfx.control.spreadsheet.SpreadsheetView.<init>(SpreadsheetView.java:563)
    at org.controlsfx.control.spreadsheet.SpreadsheetView.<init>(SpreadsheetView.java:475)
    (...)javafx.base/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
    at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
    at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
    at javafx.base/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
    at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
    at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
    at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
    at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    at javafx.base/com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
    at javafx.base/com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
    at javafx.base/javafx.event.Event.fireEvent(Event.java:198)
    at javafx.graphics/javafx.scene.Scene$ClickGenerator.postProcess(Scene.java:3589)
    at javafx.graphics/javafx.scene.Scene$ClickGenerator.access$8300(Scene.java:3517)
    at javafx.graphics/javafx.scene.Scene$MouseHandler.process(Scene.java:3885)
    at javafx.graphics/javafx.scene.Scene$MouseHandler.access$1300(Scene.java:3604)
    at javafx.graphics/javafx.scene.Scene.processMouseEvent(Scene.java:1874)
    at javafx.graphics/javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2613)
    at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:397)
    at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:295)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$2(GlassViewEventHandler.java:434)
    at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:389)
    at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:433)
    at javafx.graphics/com.sun.glass.ui.View.handleMouseEvent(View.java:556)
    at javafx.graphics/com.sun.glass.ui.View.notifyMouse(View.java:942)
    at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:175)
    at java.base/java.lang.Thread.run(Thread.java:844)

使用jdk1.8.144和jdk-9.0.1编译应用程序时,会发生相同的异常

The same exception occurs when the app is compiled with jdk1.8.144 and jdk-9.0.1

我无法迁移到ControlsFX 9.0.0,因为它们

I cannot migrate to ControlsFX 9.0.0 as they don't support SpreadsheetView yet.

有人知道如何在Java 9中运行这样的应用程序吗?

Any idea how to run such an application in Java 9?

推荐答案

这可能要晚了,但是由于一些原因,很多controlsfx组件无法在JDK 9上运行,很多controlsfx组件与JDK 9不兼容,因此版本9已发布,可以从JDK 8迁移到9,但是删除了SpreadSheetView ...

this may be late but a lot of controlsfx components do not work on JDK 9 because of couple of reasons, a lot of controlsfx components were not compatible with JDK 9,, thus version 9 was released to migrate from JDK 8 to 9,,, however, SpreadSheetView is removed...

检查此问题: https://bitbucket .org/controlsfx/controlsfx/issues/780/controlsfx-should-support-java-9

正如克里所说,使用了JDK 8

as kerry said, used JDK 8

这篇关于在Java 9中使用CcontrolsFX的SpreadsheetView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆