Css 创建jar时JavaFXJAR文件tableView样式属性不工作?

Css 创建jar时JavaFXJAR文件tableView样式属性不工作?,css,javafx,jar,tableview,netbeans-7,Css,Javafx,Jar,Tableview,Netbeans 7,我正在使用Netbeans为我的FX应用程序创建一个jar,该应用程序在独立jar中运行良好。但tableview列标题和某些字体的样式属性不起作用 我已经使表视图透明,但在罐子里它是灰色的,字体也会改变 这是我在应用程序中的CSS文件 .button { -fx-font-size: 13.0px; -fx-font-weight:bold; -fx-base: #00a7d4; -fx-background: #e5f3f6; -fx-focus-color: #0093FF; -fx-

我正在使用Netbeans为我的FX应用程序创建一个jar,该应用程序在独立jar中运行良好。但tableview列标题和某些字体的样式属性不起作用

我已经使表视图透明,但在罐子里它是灰色的,字体也会改变

这是我在应用程序中的CSS文件

.button {
-fx-font-size: 13.0px;
-fx-font-weight:bold;
-fx-base: #00a7d4;
-fx-background: #e5f3f6;
-fx-focus-color: #0093FF;
-fx-control-inner-background: #FFFFFF;
-fx-text-base-color: #FFFFFF;
-fx-background-color: transparent;
-fx-inner-border: linear-gradient(to bottom, derive(-fx-color,73.6%) 0%, derive(-fx-color,29.200000000000003%) 100%);
-fx-body-color: linear-gradient( to bottom, derive(-fx-color, 34.0%) 0%, derive(-fx-color, -18.0%) 100%);
-fx-background-insets: 0px;
-fx-border-radius: 10;
-fx-background-radius: 10;
-fx-border-color:black;
-fx-padding: 0.166667em 0.833333em 0.25em 0.833333em; /* 2 10 3 10 */
/*-fx-text-fill: -fx-text-base-color;*/
-fx-alignment: CENTER;
-fx-content-display: LEFT;
}

.button:focused {
-fx-color:#00a7d4;
-fx-background-color:transparent;
-fx-background-insets: -1.4, 0, 1, 2;
-fx-border-radius: 10;
-fx-background-radius: 10;;
}

.button:hover {
-fx-focus-color: #FF0000;
-fx-background-color: #b3ffb3;
-fx-border-radius: 10;
-fx-background-radius: 10;
}

.root {
 -fx-background-image: url("/images/back.jpg");
  -fx-background-radius: 10 ;

}

#AOLtable .table-cell{
    -fx-alignment: CENTER;
    -fx-font-weight:bold;
}

#back {          
    -fx-graphic: url("/images/Backward.png");
    -fx-graphic-text-gap : 10;
}

.tab-pane *.tab-header-background
{
-fx-background-color: transparent;
}

#Content{
  -fx-background-image: url("/images/back.jpg");
}
.table-view {
    -fx-background-color: transparent;
    -fx-background-insets: 0;
    -fx-padding: 10;
    -fx-alignment: center;
}
.table-view .column-header-background {
    -fx-background-color: transparent;
    -fx-border-color: transparent transparent rgba(255,255,255,0.3) transparent;
    -fx-border-width: 1;
    -fx-background-insets: 0;
    -fx-padding: 0 10 0 0;
}
.table-view .column-header, .table-view .filler {
    -fx-border-color: transparent;
}
.table-view .column-header .label {
    -fx-text-fill: firebrick;
    -fx-font-weight: bold;
}
.table-view .table-cell {
    -fx-background-color: transparent;
    -fx-border-color: transparent;
    -fx-text-fill: black;
    -fx-alignment: center;
}
.table-view  .table-row-cell:filled:selected:focused,
.table-view  .table-row-cell:filled:selected {
    -fx-background-color: rgba(0,0,0,0.3);
}



.table-view .table-row-cell {
    -fx-background-color: transparent;
   /* -fx-border-color:black;*/

}
请帮忙,因为我想不出是怎么回事。 由于其他组件正在工作,为什么只有javaFX的tableView列标题不工作


我尝试在tuw fxml本身中添加表视图css文件,而不是从java代码中添加它,但问题仍然存在,这不是一个错误,而是css受到了一些影响。我还制作了一个演示应用程序,看看这是否是一个应用程序错误或什么,但这一个也有相同的表视图外观,请帮助


我尝试在tuw fxml中添加表视图css文件,而不是从java代码中添加它,但问题仍然存在,这不是错误,而是css受到了一些影响。我还制作了一个演示应用程序,看看这是否是一个应用程序错误或其他东西,但该应用程序也具有与表视图相同的外观。请帮助。您的项目结构是什么样子的?更新了问题中的结构您如何加载css文件?如果以编程方式加载,则应创建一个If语句,该语句会弹出一个警报,告诉您该文件是否已成功加载。您应该做的是将该css文件放入与控制器或尝试使用它的文件完全相同的文件夹中。