TableView中出现严重错误:未能加载javafx.scene.control.control loadSkinClass

TableView中出现严重错误:未能加载javafx.scene.control.control loadSkinClass,javafx,tableview,Javafx,Tableview,嗨,我正在写一个基于,和类似例子的TableView程序。 我正在使用JavaFXSCENBuilder1.1生成表 当程序启动时,我看到一群LGO没有停止:看起来相同的错误一次又一次地发生 下面是错误转储的一部分 SEVERE: javafx.scene.control.Control loadSkinClass Failed to load skin 'StringProperty [bean: TableRow[id=null, styleClass=cell indexed-cell t

嗨,我正在写一个基于,和类似例子的TableView程序。 我正在使用JavaFXSCENBuilder1.1生成表

当程序启动时,我看到一群LGO没有停止:看起来相同的错误一次又一次地发生

下面是错误转储的一部分

SEVERE: javafx.scene.control.Control loadSkinClass Failed to load skin 'StringProperty [bean: TableRow[id=null, styleClass=cell indexed-cell table-row-cell], name: skinClassName, value: com.sun.javafx.scene.control.skin.TableRowSkin]' for control TableRow[id=null, styleClass=cell indexed-cell table-row-cell]
java.lang.IllegalArgumentException: Children: duplicate children added: parent = TableRowSkin[id=null, styleClass=cell indexed-cell table-row-cell]
    at javafx.scene.Parent$1.onProposedChange(Parent.java:307)
    at com.sun.javafx.collections.VetoableObservableList.setAll(VetoableObservableList.java:90)
    at com.sun.javafx.scene.control.skin.TableRowSkin.updateCells(TableRowSkin.java:266)
    at com.sun.javafx.scene.control.skin.TableRowSkin.<init>(TableRowSkin.java:88)
    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:526)
    at javafx.scene.control.Control.loadSkinClass(Control.java:1044)
    at javafx.scene.control.Control.access$500(Control.java:70)
    at javafx.scene.control.Control$12.invalidated(Control.java:972)
    at javafx.beans.property.StringPropertyBase.markInvalid(StringPropertyBase.java:127)
    at javafx.beans.property.StringPropertyBase.set(StringPropertyBase.java:161)
    at com.sun.javafx.css.StyleableStringProperty.set(StyleableStringProperty.java:71)
    at javafx.scene.control.Control$12.set(Control.java:964)
    at com.sun.javafx.css.StyleableStringProperty.applyStyle(StyleableStringProperty.java:59)
    at com.sun.javafx.css.StyleableStringProperty.applyStyle(StyleableStringProperty.java:31)
    at com.sun.javafx.css.StyleableProperty.set(StyleableProperty.java:70)
    at com.sun.javafx.css.StyleHelper.transitionToState(StyleHelper.java:900)
    at javafx.scene.Node.impl_processCSS(Node.java:7419)
    at javafx.scene.Parent.impl_processCSS(Parent.java:1146)
    at javafx.scene.control.Control.impl_processCSS(Control.java:1154)
    at com.sun.javafx.scene.control.skin.VirtualFlow.setCellIndex(VirtualFlow.java:1598)
    at com.sun.javafx.scene.control.skin.VirtualFlow.getCell(VirtualFlow.java:1500)
    at com.sun.javafx.scene.control.skin.VirtualFlow.getCellLength(VirtualFlow.java:1523)
    at com.sun.javafx.scene.control.skin.VirtualFlow$3.call(VirtualFlow.java:478)
    at com.sun.javafx.scene.control.skin.VirtualFlow$3.call(VirtualFlow.java:476)
    at com.sun.javafx.scene.control.skin.PositionMapper.computeViewportOffset(PositionMapper.java:143)
    at com.sun.javafx.scene.control.skin.VirtualFlow.layoutChildren(VirtualFlow.java:1001)
    at javafx.scene.Parent.layout(Parent.java:1018)
    at javafx.scene.Parent.layout(Parent.java:1028)
    at javafx.scene.Parent.layout(Parent.java:1028)
    at javafx.scene.Parent.layout(Parent.java:1028)
    at javafx.scene.Scene.layoutDirtyRoots(Scene.java:516)
    at javafx.scene.Scene.doLayoutPass(Scene.java:487)
    at javafx.scene.Scene.preferredSize(Scene.java:1489)
    at javafx.scene.Scene.impl_preferredSize(Scene.java:1516)
    at javafx.stage.Window$9.invalidated(Window.java:716)
    at javafx.beans.property.BooleanPropertyBase.markInvalid(BooleanPropertyBase.java:127)
    at javafx.beans.property.BooleanPropertyBase.set(BooleanPropertyBase.java:161)
    at javafx.stage.Window.setShowing(Window.java:779)
    at javafx.stage.Window.show(Window.java:794)
    at javafx.stage.Stage.show(Stage.java:229)
    at mytime.MyTime.start(MyTime.java:28)
    at com.sun.javafx.application.LauncherImpl$5.run(LauncherImpl.java:319)
    at com.sun.javafx.application.PlatformImpl$5.run(PlatformImpl.java:216)
    at com.sun.javafx.application.PlatformImpl$4$1.run(PlatformImpl.java:179)
    at com.sun.javafx.application.PlatformImpl$4$1.run(PlatformImpl.java:176)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.javafx.application.PlatformImpl$4.run(PlatformImpl.java:176)
    at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:76)
    at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    at com.sun.glass.ui.win.WinApplication.access$100(WinApplication.java:17)
    at com.sun.glass.ui.win.WinApplication$3$1.run(WinApplication.java:67)
    at java.lang.Thread.run(Thread.java:744)
SEVERE:javafx.scene.control.control-loadSkinClass未能为控件表行[id=null,styleClass=cell-indexed cell-table-row cell]加载skin'StringProperty[bean:TableRow[id=null,styleClass=cell-indexed cell-table-row cell],name:skinClassName,value:com.sun.javafx.scene.control.skin.TableRowSkin]'
java.lang.IllegalArgumentException:子项:添加的重复子项:父项=TableRowSkin[id=null,styleClass=单元格索引单元格表行单元格]
位于javafx.scene.Parent$1.onProposedChange(Parent.java:307)
位于com.sun.javafx.collections.VetoableObservableList.setAll(VetoableObservableList.java:90)
位于com.sun.javafx.scene.control.skin.TableRowSkin.updateCells(TableRowSkin.java:266)
位于com.sun.javafx.scene.control.skin.TableRowSkin.(TableRowSkin.java:88)
位于sun.reflect.NativeConstructorAccessorImpl.newInstance0(本机方法)
位于sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
在sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
位于java.lang.reflect.Constructor.newInstance(Constructor.java:526)
位于javafx.scene.control.control.loadSkinClass(control.java:1044)
位于javafx.scene.control.control.access的$500(control.java:70)
位于javafx.scene.control.control$12.invalidated(control.java:972)
位于javafx.beans.property.StringPropertyBase.markInvalid(StringPropertyBase.java:127)
位于javafx.beans.property.StringPropertyBase.set(StringPropertyBase.java:161)
位于com.sun.javafx.css.StyleableStringProperty.set(StyleableStringProperty.java:71)
位于javafx.scene.control.control$12.set(control.java:964)
位于com.sun.javafx.css.StyleableStringProperty.applyStyle(StyleableStringProperty.java:59)
位于com.sun.javafx.css.StyleableStringProperty.applyStyle(StyleableStringProperty.java:31)
位于com.sun.javafx.css.StyleableProperty.set(StyleableProperty.java:70)
位于com.sun.javafx.css.StyleHelper.transitionState(StyleHelper.java:900)
位于javafx.scene.Node.impl_processCSS(Node.java:7419)
位于javafx.scene.Parent.impl_processCSS(Parent.java:1146)
位于javafx.scene.control.control.impl_processCSS(control.java:1154)
位于com.sun.javafx.scene.control.skin.VirtualFlow.setCellIndex(VirtualFlow.java:1598)
位于com.sun.javafx.scene.control.skin.VirtualFlow.getCell(VirtualFlow.java:1500)
位于com.sun.javafx.scene.control.skin.VirtualFlow.getCellLength(VirtualFlow.java:1523)
位于com.sun.javafx.scene.control.skin.VirtualFlow$3.call(VirtualFlow.java:478)
位于com.sun.javafx.scene.control.skin.VirtualFlow$3.call(VirtualFlow.java:476)
位于com.sun.javafx.scene.control.skin.PositionMapper.computeViewportOffset(PositionMapper.java:143)
位于com.sun.javafx.scene.control.skin.VirtualFlow.layoutChildren(VirtualFlow.java:1001)
位于javafx.scene.Parent.layout(Parent.java:1018)
位于javafx.scene.Parent.layout(Parent.java:1028)
位于javafx.scene.Parent.layout(Parent.java:1028)
位于javafx.scene.Parent.layout(Parent.java:1028)
位于javafx.scene.scene.layoutDirtyRoots(scene.java:516)
位于javafx.scene.scene.doLayoutPass(scene.java:487)
位于javafx.scene.scene.preferredSize(scene.java:1489)
位于javafx.scene.scene.impl_preferredSize(scene.java:1516)
在javafx.stage.Window$9.invalidated(Window.java:716)
位于javafx.beans.property.BooleanPropertyBase.markInvalid(BooleanPropertyBase.java:127)
位于javafx.beans.property.BooleanPropertyBase.set(BooleanPropertyBase.java:161)
位于javafx.stage.Window.setShowing(Window.java:779)
在javafx.stage.Window.show(Window.java:794)
在javafx.stage.stage.show(stage.java:229)
在mytime.mytime.start(mytime.java:28)
位于com.sun.javafx.application.launchempl$5.run(launchempl.java:319)
位于com.sun.javafx.application.PlatformImpl$5.run(PlatformImpl.java:216)
位于com.sun.javafx.application.PlatformImpl$4$1.run(PlatformImpl.java:179)
位于com.sun.javafx.application.PlatformImpl$4$1.run(PlatformImpl.java:176)
位于java.security.AccessController.doPrivileged(本机方法)
位于com.sun.javafx.application.PlatformImpl$4.run(PlatformImpl.java:176)
位于com.sun.glass.ui.invokelateDispatcher$Future.run(invokelateDispatcher.java:76)
在com.sun.glass.ui.win.WinApplication.\u runLoop(本机方法)
com.sun.glass.ui.win.WinApplication.access$100(WinApplication.java:17)
位于com.sun.glass.ui.win.WinApplication$3$1.run(WinApplication.java:67)
运行(Thread.java:744)
这是重复的,直到我停止程序。 以下是相关代码:

public class ActivityLogEntry {
        private final SimpleStringProperty    activityName = new SimpleStringProperty();
        private final SimpleStringProperty    start_time = new SimpleStringProperty();
        private SimpleStringProperty    duration = new SimpleStringProperty();
        private SimpleStringProperty    comment = new SimpleStringProperty();

    public ActivityLogEntry(String activityName, String start_time, String duration, String comment) {
        this.activityName.set(activityName);
        this.start_time.set(start_time); 
        this.duration.set(duration); 
        this.comment.set(comment); 
    }

    public String getActivityName() {
        return activityName.get();
    }

    public void setActivityName(String ActivityName) {
        this.activityName.set(ActivityName);
    }

    public String getStart_time() {
        return start_time.get();
    }

    public void setStart_time(String start_time) {
        this.start_time.set(start_time);
    }

    public String getDuration() {
        return duration.get();
    }

    public void setDuration(String duration) {
        this.duration.set(duration);
    }

    public String getComment() {
        return comment.get();
    }

    public void setComment(String comment) {
        this.comment.set(comment);
    }
}



public class FXMLDocumentController implements Initializable {

    private Label label;
    @FXML
    private ComboBox SelectActivity;
    @FXML
    private TextArea ActivityCommentEntry;
    @FXML
    private TableView<ActivityLogEntry>   ActivityTable;
    @FXML
    private TableColumn<ActivityLogEntry,String> ActivityDuration;
    @FXML
    private TableColumn<ActivityLogEntry,String> ActivityName;
    @FXML
    private TableColumn<ActivityLogEntry,String> ActivityStartTime;
    @FXML
    private TableColumn<ActivityLogEntry,String> ActivityComment;

    private final ObservableList<ActivityLogEntry> ActivityLog = FXCollections.observableArrayList(
        new ActivityLogEntry("10:00", "Get locale","00:15", "no comment"),
        new ActivityLogEntry("10:15", "Get Parental","00:30", "boring comment"),
        new ActivityLogEntry("10:30", "e-mail","00:20", "no comment") 
    );


        private void handleButtonAction(ActionEvent event) {
        System.out.println("You clicked me!");
        label.setText("Hello World!");
    }

    @Override
    public void initialize(URL url, ResourceBundle rb) {
        // Gwt Activities and ener into the Table
        loadActivities();

        ActivityDuration.setCellValueFactory(
            new PropertyValueFactory<ActivityLogEntry,String>("duration")
                );
        ActivityName.setCellValueFactory(
            new PropertyValueFactory<ActivityLogEntry,String>("activityName")
                ); 
        ActivityStartTime.setCellValueFactory(
            new PropertyValueFactory<ActivityLogEntry,String>("start_time")
                );   
        ActivityComment.setCellValueFactory(
            new PropertyValueFactory<ActivityLogEntry,String>("comment")
                );

    //    ActivityLog.add(new ActivityLogEntry("10:00", "Get locale","00:15", "no comment"));
    //    ActivityLog.add(new ActivityLogEntry("10:15", "Get Parental","00:30", "boring comment"));
    //    ActivityLog.add(new ActivityLogEntry("10:30", "e-mail","00:20", "no comment")); 

        ActivityTable.setItems(ActivityLog);
        ActivityTable.getColumns().addAll(ActivityStartTime, ActivityName, ActivityDuration,ActivityComment);


    }

    @FXML
    private void SelectActivityAction(ActionEvent event) {
    }

    private void loadActivities() {
        ActivityType.LoadActivities();
    }

}
公共类活动日志条目{
private final SimpleStringProperty activityName=新SimpleStringProperty();
private final SimpleStringProperty start_time=新建SimpleStringProperty();
private SimpleStringProperty duration=新SimpleStringProperty();
私有SimpleStringProperty注释=新SimpleStringProperty();
公共ActivityLogEntry(字符串activityName、字符串开始时间、字符串持续时间、字符串注释){
this.activityName.set(activityName);
this.start\u time.set(start\u time);
this.duration.set(duration);
this.comment.set(comment);
}
公共字符串getActivityName(){
返回activityName.get();
}
public void setActivityName(字符串ActivityName){
this.activityName.set(activityName);
}
公共字符串getStart_time(){
返回开始时间。get();
}
公共无效设置开始时间(字符串开始时间){
this.start\u time.set(start\u time);
}
公共字符串getDuration(){
com.sun.javafx.scene.control.skin.TableRowSkin]' for control TableRow[id=null, styleClass=cell indexed-cell table-row-cell] java.lang.IllegalArgumentException: **Children: duplicate children added:** parent = TableRowSkin[id=null, styleClass=cell indexed-cell table-row-cell] at