- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
Java 告诉我他们找不到加载 fxml 文件的资源,但我不确定为什么考虑到该文件实际上位于同一目录中。我知道如果 fxml 文件有问题,也可能会抛出此错误;但如果是这种情况我不知道如何排除故障。有人可以提供指导吗?
FXML:
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.ComboBox?>
<?import javafx.scene.control.DatePicker?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.Separator?>
<?import javafx.scene.control.SplitPane?>
<?import javafx.scene.control.TableColumn?>
<?import javafx.scene.control.TableView?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.BorderPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Font?>
<?import javafx.scene.web.WebView?>
<VBox maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="714.0" prefWidth="699.0" xmlns="http://javafx.com/javafx/9" xmlns:fx="http://javafx.com/fxml/1" fx:controller="hotelmanagementsystemapp.ReservationSystemUIController">
<children>
<HBox maxHeight="100.0" maxWidth="1.7976931348623157E308" prefHeight="73.0" prefWidth="400.0" VBox.vgrow="ALWAYS">
<children>
<Button ellipsisString="~" maxHeight="1.7976931348623157E308" maxWidth="560.0" minHeight="-Infinity" minWidth="-Infinity" mnemonicParsing="false" prefHeight="73.0" prefWidth="71.0" style="-fx-background-color: linear-gradient(#286487 0%, #5886A1 100%);" text="Home" textFill="WHITE" HBox.hgrow="ALWAYS">
<font>
<Font name="Avenir Book" size="19.0" />
</font>
<HBox.margin>
<Insets bottom="2.0" left="2.0" right="2.0" top="2.0" />
</HBox.margin>
</Button>
<Button ellipsisString="~" maxHeight="1.7976931348623157E308" maxWidth="560.0" minHeight="-Infinity" minWidth="-Infinity" mnemonicParsing="false" prefHeight="73.0" prefWidth="71.0" style="-fx-background-color: linear-gradient(#286487 0%, #5886A1 100%);" text="Reservation System" textAlignment="CENTER" textFill="WHITE" wrapText="true" HBox.hgrow="ALWAYS">
<font>
<Font name="Avenir Book" size="19.0" />
</font>
<HBox.margin>
<Insets bottom="2.0" left="2.0" right="2.0" top="2.0" />
</HBox.margin>
</Button>
<Button ellipsisString="~" maxHeight="1.7976931348623157E308" maxWidth="560.0" minHeight="-Infinity" minWidth="-Infinity" mnemonicParsing="false" prefHeight="73.0" prefWidth="71.0" style="-fx-background-color: linear-gradient(#286487 0%, #5886A1 100%);" text="Home" textFill="WHITE" HBox.hgrow="ALWAYS">
<font>
<Font name="Avenir Book" size="19.0" />
</font>
<HBox.margin>
<Insets bottom="2.0" left="2.0" right="2.0" top="2.0" />
</HBox.margin>
</Button>
<Button ellipsisString="~" maxHeight="1.7976931348623157E308" maxWidth="560.0" minHeight="-Infinity" minWidth="-Infinity" mnemonicParsing="false" prefHeight="73.0" prefWidth="71.0" style="-fx-background-color: linear-gradient(#286487 0%, #5886A1 100%);" text="Home" textFill="WHITE" HBox.hgrow="ALWAYS">
<font>
<Font name="Avenir Book" size="19.0" />
</font>
<HBox.margin>
<Insets bottom="2.0" left="2.0" right="2.0" top="2.0" />
</HBox.margin>
</Button>
<Button ellipsisString="~" maxHeight="1.7976931348623157E308" maxWidth="560.0" minHeight="-Infinity" minWidth="-Infinity" mnemonicParsing="false" prefHeight="73.0" prefWidth="71.0" style="-fx-background-color: linear-gradient(#286487 0%, #5886A1 100%);" text="Home" textFill="WHITE" HBox.hgrow="ALWAYS">
<font>
<Font name="Avenir Book" size="19.0" />
</font>
<HBox.margin>
<Insets bottom="2.0" left="2.0" right="2.0" top="2.0" />
</HBox.margin>
</Button>
<Button ellipsisString="~" maxHeight="1.7976931348623157E308" maxWidth="560.0" minHeight="-Infinity" minWidth="-Infinity" mnemonicParsing="false" prefHeight="73.0" prefWidth="71.0" style="-fx-background-color: linear-gradient(#286487 0%, #5886A1 100%);" text="Home" textFill="WHITE" HBox.hgrow="ALWAYS">
<font>
<Font name="Avenir Book" size="19.0" />
</font>
<HBox.margin>
<Insets bottom="2.0" left="2.0" right="2.0" top="2.0" />
</HBox.margin>
</Button>
</children>
</HBox>
<Separator prefWidth="200.0" />
<SplitPane dividerPositions="0.381635581061693, 0.8694404591104734" prefHeight="284.0" prefWidth="699.0">
<items>
<VBox maxWidth="300.0" prefHeight="159.0" prefWidth="234.0" spacing="5.0">
<children>
<Label text="Booking Information:" />
<Separator prefWidth="200.0" />
<HBox prefHeight="33.0" prefWidth="144.0" style="-fx-border-color: #979797;">
<children>
<Label minHeight="33.0" minWidth="52.0" text="* From" />
<DatePicker maxWidth="1.7976931348623157E308" minHeight="27.0" minWidth="144.0" HBox.hgrow="ALWAYS" />
</children>
<padding>
<Insets left="5.0" right="5.0" top="5.0" />
</padding>
<opaqueInsets>
<Insets />
</opaqueInsets>
</HBox>
<HBox prefHeight="30.0" prefWidth="144.0" style="-fx-border-color: #979797;">
<children>
<Label minWidth="-Infinity" prefHeight="33.0" prefWidth="52.0" text="* To" HBox.hgrow="ALWAYS" />
<DatePicker maxWidth="1.7976931348623157E308" minHeight="27.0" minWidth="144.0" HBox.hgrow="ALWAYS">
<HBox.margin>
<Insets top="5.0" />
</HBox.margin>
</DatePicker>
</children>
<padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding>
</HBox>
<HBox prefHeight="30.0" prefWidth="144.0" style="-fx-border-color: #979797;">
<children>
<Label minHeight="30.0" minWidth="79.0" text="Room Type" />
<ComboBox maxWidth="1.7976931348623157E308" minHeight="27.0" minWidth="115.0" HBox.hgrow="ALWAYS">
<HBox.margin>
<Insets top="5.0" />
</HBox.margin>
</ComboBox>
</children>
<padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding>
</HBox>
<AnchorPane maxWidth="1.7976931348623157E308" VBox.vgrow="ALWAYS">
<children>
<HBox minWidth="55.0" style="-fx-border-color: #979797;">
<children>
<Label alignment="CENTER" contentDisplay="CENTER" minHeight="42.0" minWidth="39.0" text="No." textAlignment="CENTER" />
<ComboBox maxWidth="-Infinity" minHeight="27.0" minWidth="-Infinity" prefWidth="60.0" HBox.hgrow="ALWAYS">
<HBox.margin>
<Insets top="8.0" />
</HBox.margin>
</ComboBox>
</children>
<padding>
<Insets right="8.0" />
</padding>
</HBox>
</children>
</AnchorPane>
<AnchorPane prefHeight="200.0" prefWidth="200.0">
<children>
<Button layoutX="174.0" layoutY="74.0" mnemonicParsing="false" style="-fx-background-color: #01B0EA;" text="SEARCH" textAlignment="CENTER" AnchorPane.bottomAnchor="7.0" AnchorPane.rightAnchor="7.0" />
</children>
</AnchorPane>
</children>
<padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding>
</VBox>
<HBox maxHeight="1.7976931348623157E308" SplitPane.resizableWithParent="false">
<children>
<BorderPane maxHeight="300.0" maxWidth="400.0" minWidth="-Infinity" prefHeight="197.0" prefWidth="255.0" HBox.hgrow="SOMETIMES">
<top>
<HBox maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="26.0" prefWidth="190.0" BorderPane.alignment="CENTER">
<children>
<Button maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" mnemonicParsing="false" text="April" HBox.hgrow="SOMETIMES" />
</children>
</HBox>
</top>
<center>
<VBox maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="200.0" prefWidth="100.0" BorderPane.alignment="CENTER">
<children>
<HBox maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="29.0" prefWidth="190.0" VBox.vgrow="ALWAYS">
<children>
<Button ellipsisString="key.unspecified" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" mnemonicParsing="false" prefHeight="27.0" prefWidth="19.0" text="1" HBox.hgrow="ALWAYS" />
<Button ellipsisString="key.unspecified" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" mnemonicParsing="false" prefHeight="27.0" prefWidth="19.0" text="2" HBox.hgrow="ALWAYS" />
<Button ellipsisString="key.unspecified" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" mnemonicParsing="false" prefHeight="27.0" prefWidth="19.0" text="3" HBox.hgrow="ALWAYS" />
<Button ellipsisString="key.unspecified" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" mnemonicParsing="false" prefHeight="27.0" prefWidth="19.0" text="4" HBox.hgrow="ALWAYS" />
<Button ellipsisString="key.unspecified" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" mnemonicParsing="false" prefHeight="27.0" prefWidth="19.0" text="5" HBox.hgrow="ALWAYS" />
<Button ellipsisString="key.unspecified" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" mnemonicParsing="false" prefHeight="27.0" prefWidth="19.0" text="6" HBox.hgrow="ALWAYS" />
<Button ellipsisString="key.unspecified" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" mnemonicParsing="false" prefHeight="27.0" prefWidth="19.0" text="7" HBox.hgrow="ALWAYS" />
</children>
</HBox>
<HBox maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="29.0" prefWidth="190.0" VBox.vgrow="ALWAYS">
<children>
<Button ellipsisString="key.unspecified" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" mnemonicParsing="false" prefHeight="27.0" prefWidth="19.0" text="8" HBox.hgrow="ALWAYS" />
<Button ellipsisString="key.unspecified" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" mnemonicParsing="false" prefHeight="27.0" prefWidth="19.0" text="9" HBox.hgrow="ALWAYS" />
<Button ellipsisString="key.unspecified" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" mnemonicParsing="false" prefHeight="27.0" prefWidth="19.0" text="10" HBox.hgrow="ALWAYS" />
<Button ellipsisString="key.unspecified" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" mnemonicParsing="false" prefHeight="27.0" prefWidth="19.0" text="11" HBox.hgrow="ALWAYS" />
<Button ellipsisString="key.unspecified" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" mnemonicParsing="false" prefHeight="27.0" prefWidth="19.0" text="12" HBox.hgrow="ALWAYS" />
<Button ellipsisString="key.unspecified" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" mnemonicParsing="false" prefHeight="27.0" prefWidth="19.0" text="13" HBox.hgrow="ALWAYS" />
<Button ellipsisString="key.unspecified" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" mnemonicParsing="false" prefHeight="27.0" prefWidth="19.0" text="14" HBox.hgrow="ALWAYS" />
</children>
</HBox>
<HBox maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="29.0" prefWidth="190.0" VBox.vgrow="ALWAYS">
<children>
<Button ellipsisString="%key.unspecifiedkey.unspecified" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" mnemonicParsing="false" prefHeight="27.0" prefWidth="19.0" text="15" HBox.hgrow="ALWAYS" />
<Button ellipsisString="%key.unspecifiedkey.unspecified" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" mnemonicParsing="false" prefHeight="27.0" prefWidth="19.0" text="16" HBox.hgrow="ALWAYS">
<opaqueInsets>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</opaqueInsets>
</Button>
<Button ellipsisString="%key.unspecifiedkey.unspecified" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" mnemonicParsing="false" prefHeight="27.0" prefWidth="19.0" text="17" HBox.hgrow="ALWAYS" />
<Button ellipsisString="%key.unspecifiedkey.unspecified" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" mnemonicParsing="false" prefHeight="27.0" prefWidth="19.0" text="18" HBox.hgrow="ALWAYS" />
<Button ellipsisString="%key.unspecifiedkey.unspecified" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" mnemonicParsing="false" prefHeight="27.0" prefWidth="19.0" text="19" HBox.hgrow="ALWAYS" />
<Button ellipsisString="%key.unspecifiedkey.unspecified" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" mnemonicParsing="false" prefHeight="27.0" prefWidth="19.0" text="20" HBox.hgrow="ALWAYS" />
<Button ellipsisString="key.unspecifiedkey" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" mnemonicParsing="false" prefHeight="27.0" prefWidth="19.0" text="21" HBox.hgrow="ALWAYS" />
</children>
</HBox>
<HBox maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="29.0" prefWidth="190.0" VBox.vgrow="ALWAYS">
<children>
<Button ellipsisString="%key.unspecifiedkey.unspecified" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" mnemonicParsing="false" prefHeight="27.0" prefWidth="19.0" text="22" HBox.hgrow="ALWAYS" />
<Button ellipsisString="%key.unspecifiedkey.unspecified" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" mnemonicParsing="false" prefHeight="27.0" prefWidth="19.0" text="23" HBox.hgrow="ALWAYS" />
<Button ellipsisString="%key.unspecifiedkey.unspecified" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" mnemonicParsing="false" prefHeight="27.0" prefWidth="19.0" text="24" HBox.hgrow="ALWAYS" />
<Button ellipsisString="%key.unspecifiedkey.unspecified" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" mnemonicParsing="false" prefHeight="27.0" prefWidth="19.0" text="25" HBox.hgrow="ALWAYS" />
<Button ellipsisString="%key.unspecifiedkey.unspecified" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" mnemonicParsing="false" prefHeight="27.0" prefWidth="19.0" text="26" HBox.hgrow="ALWAYS" />
<Button ellipsisString="%key.unspecifiedkey.unspecified" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" mnemonicParsing="false" prefHeight="27.0" prefWidth="19.0" text="27" HBox.hgrow="ALWAYS" />
<Button ellipsisString="%key.unspecifiedkey.unspecified" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" mnemonicParsing="false" prefHeight="27.0" prefWidth="19.0" text="28" />
</children>
</HBox>
<HBox maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="29.0" prefWidth="190.0" VBox.vgrow="ALWAYS">
<children>
<Button ellipsisString="%key.unspecifiedkey.unspecified" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" mnemonicParsing="false" prefHeight="27.0" prefWidth="19.0" text="29" HBox.hgrow="ALWAYS" />
<Button ellipsisString="%key.unspecifiedkey.unspecified" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" mnemonicParsing="false" prefHeight="27.0" prefWidth="19.0" text="30" HBox.hgrow="ALWAYS" />
<Button ellipsisString="%key.unspecifiedkey.unspecified" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" mnemonicParsing="false" prefHeight="27.0" prefWidth="19.0" text="31" HBox.hgrow="ALWAYS" />
</children>
</HBox>
</children>
</VBox>
</center>
</BorderPane>
</children>
</HBox>
<WebView prefHeight="200.0" prefWidth="200.0" />
</items>
</SplitPane>
<HBox maxWidth="1.7976931348623157E308">
<children>
<Separator prefHeight="0.0" prefWidth="14.0">
<HBox.margin>
<Insets right="5.0" top="17.0" />
</HBox.margin>
</Separator>
<Label minHeight="-Infinity" minWidth="-Infinity" prefHeight="32.0" prefWidth="83.0" style="-fx-background-color: #3D91C1;" text="Available" textFill="WHITE">
<font>
<Font size="17.0" />
</font>
<padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding>
</Label>
<Separator prefHeight="0.0" prefWidth="538.0" HBox.hgrow="ALWAYS">
<HBox.margin>
<Insets left="5.0" right="5.0" top="17.0" />
</HBox.margin>
</Separator>
</children>
<padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding>
</HBox>
<TableView maxWidth="1.7976931348623157E308" prefHeight="282.0" prefWidth="699.0" stylesheets="@reservationsystemui.css" VBox.vgrow="ALWAYS">
<columns>
<TableColumn maxWidth="775.0" minWidth="109.0" prefWidth="109.0" text="Room No." />
<TableColumn maxWidth="1065.0" minWidth="149.0" prefWidth="149.0" text="Duration" />
<TableColumn maxWidth="1140.0" minWidth="160.0" prefWidth="160.0" text="Notes" />
<TableColumn maxWidth="929.0" minWidth="130.0" prefWidth="130.0" text="Add. Packages" />
<TableColumn maxWidth="1070.0" minWidth="150.0" prefWidth="150.0" text="Action" />
</columns>
</TableView>
</children>
</VBox>
目录结构:
public void start(Stage stage) throws IOException
{
Parent root = FXMLLoader.load(getClass().getResource("ReservationSystemUI.fxml")); //<— ERROR
Scene scene = new Scene(root);
stage.setScene(scene);
stage.sizeToScene();
stage.setMinWidth(scene.widthProperty().doubleValue());
stage.setMinHeight(scene.heightProperty().doubleValue());
stage.show();
}
堆栈跟踪:
Executing /Users/norriswise/NetBeansProjects/HotelManagementSystemApp/dist/run1290999908/HotelManagementSystemApp.jar using platform /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/bin/java
Feb 12, 2018 9:52:26 PM javafx.fxml.FXMLLoader$ValueElement processValue
WARNING: Loading FXML document with JavaFX API of version 9 by JavaFX runtime of version 8.0.131
Exception in Application start method
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:389)
at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:328)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:767)
Caused by: java.lang.RuntimeException: Exception in Application start method
at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:917)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$155(LauncherImpl.java:182)
at java.lang.Thread.run(Thread.java:748)
Caused by: javafx.fxml.LoadException: No resources specified. //<— ERROR
file:/Users/norriswise/NetBeansProjects/HotelManagementSystemApp/dist/run1290999908/HotelManagementSystemApp.jar!/hotelmanagementsystemapp/ReservationSystemUI.fxml:182
at javafx.fxml.FXMLLoader.constructLoadException(FXMLLoader.java:2597)
at javafx.fxml.FXMLLoader.access$100(FXMLLoader.java:103)
at javafx.fxml.FXMLLoader$Element.resolvePrefixedValue(FXMLLoader.java:421)
at javafx.fxml.FXMLLoader$Element.processValue(FXMLLoader.java:363)
at javafx.fxml.FXMLLoader$Element.processPropertyAttribute(FXMLLoader.java:325)
at javafx.fxml.FXMLLoader$Element.processInstancePropertyAttributes(FXMLLoader.java:235)
at javafx.fxml.FXMLLoader$ValueElement.processEndElement(FXMLLoader.java:767)
at javafx.fxml.FXMLLoader.processEndElement(FXMLLoader.java:2823)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2532)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2441)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3214)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3175)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3148)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3124)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3104)
at javafx.fxml.FXMLLoader.load(FXMLLoader.java:3097)
at hotelmanagementsystemapp.HotelManagementSystemApp.start(HotelManagementSystemApp.java:29)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$162(LauncherImpl.java:863)
at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$175(PlatformImpl.java:326)
at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
Exception running application hotelmanagementsystemapp.HotelManagementSystemApp
Java Result: 1
Deleting directory /Users/norriswise/NetBeansProjects/HotelManagementSystemApp/dist/run1290999908
jfxsa-run:
BUILD SUCCESSFUL (total time: 2 seconds)
最佳答案
我发布这个答案是因为我自己找到了答案。感谢您的提示@James_D。
对于按钮,如果框太小,ellipsisString 属性需要您指定一个键来替换按钮中的字符串。 %key.unspecifiedkey.unspecified
无效,将查找外部资源(当没有给出时),并使程序崩溃。
<Button ellipsisString="%key.unspecifiedkey.unspecified" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" mnemonicParsing="false" prefHeight="27.0" prefWidth="19.0" text="15" HBox.hgrow="ALWAYS" />
%key.unspecifiedkey.unspecified
需要替换为您使用的任何符号。我正在使用~
:
<Button ellipsisString="~" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" mnemonicParsing="false" prefHeight="27.0" prefWidth="19.0" text="15" HBox.hgrow="ALWAYS" />
关于java - 获取 : javafx. fxml.LoadException : No resources specified. 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48773214/
我需要您在以下方面提供帮助。近一个月来,我一直在阅读有关任务和异步的内容。 我想尝试在一个简单的 wep api 项目中实现我新获得的知识。我有以下方法,并且它们都按预期工作: public Htt
我的可执行 jar 中有一个模板文件 (.xls)。不需要在运行时我需要为这个文件创建 100 多个副本(稍后将唯一地附加)。用于获取 jar 文件中的资源 (template.xls)。我正在使用
我在查看网站的模型代码时对原型(prototype)有疑问。我知道这对 Javascript 中的继承很有用。 在这个例子中... define([], function () { "use
影响我性能的前三项操作是: 获取滚动条 获取偏移高度 Ext.getStyle 为了解释我的应用程序中发生了什么:我有一个网格,其中有一列在每个单元格中呈现网格。当我几乎对网格的内容做任何事情时,它运
我正在使用以下函数来获取 URL 参数。 function gup(name, url) { name = name.replace(/[\[]/, '\\\[').replace(/[\]]/,
我最近一直在使用 sysctl 来做很多事情,现在我使用 HW_MACHINE_ARCH 变量。我正在使用以下代码。请注意,当我尝试获取其他变量 HW_MACHINE 时,此代码可以完美运行。我还认为
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 关闭 9 年前。 要求提供代码的问题必须表现出对所解决问题的最低限度的理解。包括尝试过的解决方案、为什么
由于使用 main-bower-files 作为使用 Gulp 的编译任务的一部分,我无法使用 node_modules 中的 webpack 来require 模块code> dir 因为我会弄乱当
关闭。这个问题需要更多focused .它目前不接受答案。 想改进这个问题吗? 更新问题,使其只关注一个问题 editing this post . 关闭 5 年前。 Improve this qu
我使用 Gridlayout 在一行中放置 4 个元素。首先,我有一个 JPanel,一切正常。对于行数变大并且我必须能够向下滚动的情况,我对其进行了一些更改。现在我的 JPanel 上添加了一个 J
由于以下原因,我想将 VolumeId 的值保存在变量中: #!/usr/bin/env python import boto3 import json import argparse import
我正在将 MSAL 版本 1.x 更新为 MSAL-browser 的 Angular 。所以我正在尝试从版本 1.x 迁移到 2.X.I 能够成功替换代码并且工作正常。但是我遇到了 acquireT
我知道有很多关于此的问题,例如 Getting daily averages with pandas和 How get monthly mean in pandas using groupby但我遇到
This is the query string that I am receiving in URL. Output url: /demo/analysis/test?startDate=Sat+
我正在尝试使用 javascript 中的以下代码访问 Geoserver 层 var gkvrtWmsSource =new ol.source.ImageWMS({ u
API 需要一个包含授权代码的 header 。这就是我到目前为止所拥有的: var fullUrl = 'https://api.ecobee.com/1/thermostat?json=\{"s
如何获取文件中的最后一个字符,如果是某个字符,则删除它而不将整个文件加载到内存中? 这就是我目前所拥有的。 using (var fileStream = new FileStream("file.t
我是这个社区的新手,想出了我的第一个问题。 我正在使用 JSP,我成功地创建了 JSP-Sites,它正在使用jsp:setParameter 和 jsp:getParameter 具有单个字符串。
在回答 StoreStore reordering happens when compiling C++ for x86 @Peter Cordes 写过 For Acquire/Release se
我有一个函数,我们将其命名为 X1,它返回变量 Y。该函数在操作 .on("focusout", X1) 中使用。如何获取变量Y?执行.on后X1的结果? 最佳答案 您可以更改 Y 的范围以使其位于函
我是一名优秀的程序员,十分优秀!