我一直在尝试从表格视图中删除空行,但我无法使用我在一些博客中阅读的 css 来做到这一点
这是我正在应用的css /---------------------------------------- ----------
.table-row-cell:empty {
-fx-background-color: white;
}
.table-row-cell:empty .table-cell {
-fx-border-width: 0px;
}
/----------------------------------------------------
但我得到了错误
/------------------------------------
SEVERE: javafx.scene.control.Control loadSkinClass Failed to load skin 'com.sun.javafx.scene.control.skin.TableRowSkin' for control TableView@125ff34[styleClass=table-view table-row-cell]
java.lang.IllegalArgumentException: argument type mismatch
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at javafx.scene.control.Control.loadSkinClass(Unknown Source)
at javafx.scene.control.Control.impl_cssSet(Unknown Source)
at javafx.scene.Node.impl_cssSet(Unknown Source)
at com.sun.javafx.css.StyleHelper.transitionToState(Unknown Source)
at javafx.scene.Node.impl_processCSS(Unknown Source)
at javafx.scene.Parent.impl_processCSS(Unknown Source)
at javafx.scene.control.Control.impl_processCSS(Unknown Source)
at javafx.scene.Parent.impl_processCSS(Unknown Source)
at javafx.scene.Parent.impl_processCSS(Unknown Source)
at javafx.scene.Node.processCSS(Unknown Source)
at javafx.scene.Node.processCSS(Unknown Source)
at javafx.scene.Scene.doCSSPass(Unknown Source)
at javafx.scene.Scene.access$2900(Unknown Source)
at javafx.scene.Scene$ScenePulseListener.pulse(Unknown Source)
at com.sun.javafx.tk.Toolkit.firePulse(Unknown Source)
at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(Unknown Source)
at com.sun.javafx.tk.quantum.QuantumToolkit$8.run(Unknown Source)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.access$100(Unknown Source)
at com.sun.glass.ui.win.WinApplication$2$1.run(Unknown Source)
at java.lang.Thread.run(Thread.java:722)
SEVERE: javafx.scene.control.Control impl_processCSS The -fx-skin property has not been defined in CSS for TableView@125ff34[styleClass=table-view table-row-cell]
/---------------------------------------------------- ------------
有人知道如何解决吗?或任何其他方式来删除空行。
提前致谢。