如何在javafx中检查idlemonitor
当使用javafx检查用户的空闲时,我遇到了一些问题。我使用的是JavaFX8。我有一个主fxml文件,我称之为test.fxml。此文件代码如下所示如何在javafx中检查idlemonitor,java,javafx,javafx-8,Java,Javafx,Javafx 8,当使用javafx检查用户的空闲时,我遇到了一些问题。我使用的是JavaFX8。我有一个主fxml文件,我称之为test.fxml。此文件代码如下所示 <?xml version="1.0" encoding="UTF-8"?> <?import javafx.scene.layout.*?> <?import java.lang.*?> <?import javafx.scene.control.*?> <AnchorPane max
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.layout.*?>
<?import java.lang.*?>
<?import javafx.scene.control.*?>
<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1">
<children>
<Pane layoutX="7.0" prefHeight="400.0" prefWidth="600.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<children>
<Label layoutX="191.0" layoutY="103.0" text="Test" />
<TextField layoutX="263.0" layoutY="99.0" />
<Button layoutX="263.0" layoutY="151.0" mnemonicParsing="false" text="PROCES" />
</children>
</Pane>
</children>
</AnchorPane>
例如,若用户空闲时间达到30秒,那个么用户将转到另一个fxml文件。这个代码看起来像
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.layout.*?>
<?import java.lang.*?>
<?import javafx.scene.control.*?>
<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1">
<children>
<Pane layoutX="7.0" prefHeight="400.0" prefWidth="600.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<children>
<Label layoutX="191.0" layoutY="103.0" prefHeight="76.0" prefWidth="177.0" text="SORRY, YOU ARE IN IDLE TIME" />
</children>
</Pane>
</children>
</AnchorPane>
谢谢您……可能与fxml实现重复,我认为这与fxml实现不同