Advertisement
Guest User

Untitled

a guest
Apr 1st, 2018
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 27.63 KB | None | 0 0
  1. import javafx.event.ActionEvent;
  2. import javafx.fxml.FXML;
  3. import javafx.fxml.FXMLLoader;
  4. import javafx.fxml.Initializable;
  5. import javafx.scene.Node;
  6. import javafx.scene.Parent;
  7. import javafx.scene.Scene;
  8. import javafx.scene.chart.LineChart;
  9. import javafx.scene.chart.XYChart;
  10. import javafx.scene.control.Button;
  11. import javafx.scene.control.TextField;
  12. import javafx.scene.layout.AnchorPane;
  13. import javafx.scene.layout.BorderPane;
  14. import javafx.scene.web.WebEngine;
  15. import javafx.scene.web.WebView;
  16. import javafx.stage.Modality;
  17. import javafx.stage.Stage;
  18.  
  19.  
  20. import javax.swing.*;
  21. import java.io.IOException;
  22. import java.net.URL;
  23. import java.sql.*;
  24. import java.text.SimpleDateFormat;
  25. import java.util.Date;
  26. import java.util.ResourceBundle;
  27. import java.util.logging.Level;
  28. import java.util.logging.Logger;
  29.  
  30. public class Controller implements Initializable {
  31. @FXML
  32. private Button button = new Button();
  33. @FXML
  34. private TextField textField1;
  35. @FXML
  36. private TextField textField2;
  37. @FXML
  38. private TextField textField3;
  39. @FXML
  40. private TextField textField4;
  41. @FXML
  42. private TextField textField5;
  43. @FXML
  44. private TextField textField6;
  45. @FXML
  46. private TextField textField7;
  47. @FXML
  48. private TextField textField8;
  49. private int t = 70;
  50. private int v = 100;
  51. private double N;
  52.  
  53. @FXML
  54. public WebView webView;
  55.  
  56. @FXML
  57. private WebView mery;
  58. @FXML
  59. private WebView vibronas;
  60. @FXML
  61. private WebView tvb;
  62. @FXML
  63. private WebView defekt;
  64. @FXML
  65. private WebView pironas;
  66. @FXML
  67. private WebView ttxpiro;
  68.  
  69. @FXML
  70. private LineChart<String,Double> lineChart;
  71. @FXML
  72. private Button btnLoad = new Button();
  73.  
  74. private Connection conn;
  75.  
  76. @Override
  77. public void initialize(URL location, ResourceBundle resources) {
  78. WebEngine webEngine0 = webView.getEngine();//ошибка
  79. webEngine0.load(getClass().getResource("/html/us.html").toExternalForm());
  80. WebEngine webEngine1 = mery.getEngine();
  81. webEngine1.load(getClass().getResource("/html/mery.html").toExternalForm());
  82. WebEngine webEngine2 = vibronas.getEngine();
  83. webEngine2.load(getClass().getResource("/html/vibronas.html").toExternalForm());
  84. WebEngine webEngine3 = tvb.getEngine();
  85. webEngine3.load(getClass().getResource("/html/ttxvib.html").toExternalForm());
  86. WebEngine webEngine4 = defekt.getEngine();
  87. webEngine4.load(getClass().getResource("/html/defekt.html").toExternalForm());
  88. WebEngine webEngine5 = pironas.getEngine();
  89. webEngine5.load(getClass().getResource("/html/pironas.html").toExternalForm());
  90. WebEngine webEngine6 = ttxpiro.getEngine();
  91. webEngine6.load(getClass().getResource("/html/ttxpiro.html").toExternalForm());
  92. }
  93.  
  94. @FXML
  95. private void press(ActionEvent event) throws IOException {
  96. FXMLLoader loader = new FXMLLoader(getClass().getResource("res.fxml"));//ошибка
  97. BorderPane root = (BorderPane) loader.load();
  98. Stage dialogStage = new Stage();
  99. dialogStage.setTitle("Edit Profile");
  100. dialogStage.initModality(Modality.WINDOW_MODAL);
  101. Scene scene = new Scene(root);
  102. dialogStage.setScene(scene);
  103. }
  104. @FXML
  105. private void loadChar(ActionEvent event){
  106. String query = "SELECT data,N FROM books ORDER BY data ASC;";
  107. XYChart.Series<String, Double> series = new XYChart.Series<String, Double>();
  108. try {
  109. //Connect DB;
  110. conn = connectDB();
  111. //execute query
  112. ResultSet resultSet = conn.createStatement().executeQuery(query);
  113. while (resultSet.next()){
  114. series.getData().add(new XYChart.Data<String, Double>(resultSet.getString(1),resultSet.getDouble(2)));
  115. }
  116. lineChart.getData().add(series);
  117.  
  118. }catch (Exception e){
  119. }
  120.  
  121. }
  122.  
  123. private Connection connectDB(){
  124. try {
  125. String urlDB = "jdbc:sqlite:books.db";
  126. String user = "root";
  127. String password = "1234";
  128. //Connect DB;
  129. Connection connection = DriverManager.getConnection(urlDB,user,password);
  130. System.out.println("Подключение успешно!");
  131. return connection;
  132. } catch (SQLException e) {
  133. Logger.getLogger(Controller.class.getName()).log(Level.SEVERE,null,e);
  134. }
  135. return null;
  136. }
  137.  
  138. @FXML
  139. private void result(){
  140.  
  141. String s1 = textField1.getText();
  142. String s2 = textField2.getText();
  143. String s3 = textField3.getText();
  144. String s4 = textField4.getText();
  145. String s5 = textField5.getText();
  146. String s6 = textField6.getText();
  147. String s7 = textField7.getText();
  148. String s8 = textField8.getText();
  149. int t1 = Integer.parseInt(s1);
  150. int t2 = Integer.parseInt(s2);
  151. int t3 = Integer.parseInt(s3);
  152. int t4 = Integer.parseInt(s4);
  153. int t5 = Integer.parseInt(s5);
  154. int t6 = Integer.parseInt(s6);
  155. int t7 = Integer.parseInt(s7);
  156. int t8 = Integer.parseInt(s8);
  157.  
  158. if ((t1 < t) && (t2 < t) && (t3 < t) && (t4 < t) && (t5 < v) && (t6 < v) && (t7 < v) && (t8 < v)){
  159. JOptionPane.showMessageDialog(null, "Агрегат в исправном состоянии!");
  160. } else if((t1 > t) && (t2 < t) && (t3 < t) && (t4 < t) && (t5 > v) && (t6 < v) && (t7 < v) && (t8 < v)){
  161. JOptionPane.showMessageDialog(null, "Первая опора в критическом состоянии!");
  162. } else if((t1 < t) && (t2 > t) && (t3 < t) && (t4 < t) && (t5 < v) && (t6 > v) && (t7 < v) && (t8 < v)){
  163. JOptionPane.showMessageDialog(null, "Вторая опора в критическом состоянии!");
  164. } else if((t1 < t) && (t2 < t) && (t3 > t) && (t4 < t) && (t5 < v) && (t6 < v) && (t7 > v) && (t8 < v)){
  165. JOptionPane.showMessageDialog(null, "Третья опора в критическом состоянии!");
  166. } else if((t1 < t) && (t2 < t) && (t3 < t) && (t4 > t) && (t5 < v) && (t6 < v) && (t7 < v) && (t8 > v)){
  167. JOptionPane.showMessageDialog(null, "Четвёртая опора в критическом состоянии!");
  168. } else if((t1 > t) && (t2 > t) && (t3 < t) && (t4 < t) && (t5 > v) && (t6 > v) && (t7 < v) && (t8 < v)){
  169. JOptionPane.showMessageDialog(null, "Первая и вторая опоры в критическом состоянии!");
  170. }else if((t1 > t) && (t2 < t) && (t3 > t) && (t4 < t) && (t5 > v) && (t6 < v) && (t7 > v) && (t8 < v)){
  171. JOptionPane.showMessageDialog(null, "Первая и третья опоры в критическом состоянии!");
  172. }else if((t1 > t) && (t2 < t) && (t3 < t) && (t4 > t) && (t5 > v) && (t6 < v) && (t7 < v) && (t8 > v)){
  173. JOptionPane.showMessageDialog(null, "Первая и четвёртая опоры в критическом состоянии!");
  174. } else if((t1 < t) && (t2 > t) && (t3 > t) && (t4 < t) && (t5 < v) && (t6 > v) && (t7 > v) && (t8 < v)){
  175. JOptionPane.showMessageDialog(null, "Вторая и третья опоры в критическом состоянии!");
  176. } else if((t1 < t) && (t2 > t) && (t3 < t) && (t4 > t) && (t5 < v) && (t6 > v) && (t7 < v) && (t8 > v)){
  177. JOptionPane.showMessageDialog(null, "Вторая и четвёртая опоры в критическом состоянии!");
  178. } else if((t1 < t) && (t2 < t) && (t3 > t) && (t4 > t) && (t5 < v) && (t6 < v) && (t7 > v) && (t8 > v)){
  179. JOptionPane.showMessageDialog(null, "Третья и четвёртая опоры в критическом состоянии!");
  180. } else if((t1 > t) && (t2 > t) && (t3 > t) && (t4 < t) && (t5 > v) && (t6 > v) && (t7 > v) && (t8 < v)){
  181. JOptionPane.showMessageDialog(null, "Первая, вторая и третья опоры в критическом состоянии!");
  182. } else if((t1 > t) && (t2 > t) && (t3 < t) && (t4 > t) && (t5 > v) && (t6 > v) && (t7 < v) && (t8 > v)){
  183. JOptionPane.showMessageDialog(null, "Первая, вторая и четвертая опоры в критическом состоянии!");
  184. } else if((t1 > t) && (t2 < t) && (t3 > t) && (t4 > t) && (t5 > v) && (t6 < v) && (t7 > v) && (t8 > v)){
  185. JOptionPane.showMessageDialog(null, "Первая, третья и четвертая опоры в критическом состоянии!");
  186. } else if((t1 < t) && (t2 > t) && (t3 > t) && (t4 > t) && (t5 < v) && (t6 > v) && (t7 > v) && (t8 > v)){
  187. JOptionPane.showMessageDialog(null, "Вторая, третья и четвертая опоры в критическом состоянии!");
  188. } else if((t1 > t) && (t2 < t) && (t3 < t) && (t4 < t) && (t5 < v) && (t6 > v) && (t7 < v) && (t8 < v)){
  189. JOptionPane.showMessageDialog(null, "Первая и вторая опоры в критическом состоянии!");
  190. } else if((t1 > t) && (t2 < t) && (t3 < t) && (t4 < t) && (t5 < v) && (t6 < v) && (t7 > v) && (t8 < v)){
  191. JOptionPane.showMessageDialog(null, "Первая и третья опоры в критическом состоянии!");
  192. } else if((t1 > t) && (t2 < t) && (t3 < t) && (t4 < t) && (t5 < v) && (t6 < v) && (t7 < v) && (t8 > v)){
  193. JOptionPane.showMessageDialog(null, "Первая и четвертая опоры в критическом состоянии!");
  194. } else if((t1 < t) && (t2 > t) && (t3 < t) && (t4 < t) && (t5 > v) && (t6 < v) && (t7 < v) && (t8 < v)){
  195. JOptionPane.showMessageDialog(null, "Первая и вторая опоры в критическом состоянии!");
  196. } else if((t1 < t) && (t2 > t) && (t3 < t) && (t4 < t) && (t5 < v) && (t6 < v) && (t7 > v) && (t8 < v)){
  197. JOptionPane.showMessageDialog(null, "Вторая и третья опоры в критическом состоянии!");
  198. } else if((t1 < t) && (t2 > t) && (t3 < t) && (t4 < t) && (t5 < v) && (t6 < v) && (t7 < v) && (t8 > v)){
  199. JOptionPane.showMessageDialog(null, "Вторая и четвертая опоры в критическом состоянии!");
  200. } else if((t1 < t) && (t2 < t) && (t3 > t) && (t4 < t) && (t5 > v) && (t6 < v) && (t7 < v) && (t8 < v)){
  201. JOptionPane.showMessageDialog(null, "Первая и третья опоры в критическом состоянии!");
  202. } else if((t1 < t) && (t2 < t) && (t3 > t) && (t4 < t) && (t5 < v) && (t6 > v) && (t7 < v) && (t8 < v)){
  203. JOptionPane.showMessageDialog(null, "Вторая и третья опоры в критическом состоянии!");
  204. } else if((t1 < t) && (t2 < t) && (t3 > t) && (t4 < t) && (t5 < v) && (t6 < v) && (t7 < v) && (t8 > v)){
  205. JOptionPane.showMessageDialog(null, "Третья и четвертая опоры в критическом состоянии!");
  206. } else if((t1 < t) && (t2 < t) && (t3 < t) && (t4 > t) && (t5 > v) && (t6 < v) && (t7 < v) && (t8 < v)){
  207. JOptionPane.showMessageDialog(null, "Первая и четвартая опоры в критическом состоянии!");
  208. } else if((t1 < t) && (t2 < t) && (t3 < t) && (t4 > t) && (t5 < v) && (t6 > v) && (t7 < v) && (t8 < v)){
  209. JOptionPane.showMessageDialog(null, "Вторая и четвартая опоры в критическом состоянии!");
  210. } else if((t1 < t) && (t2 < t) && (t3 < t) && (t4 > t) && (t5 < v) && (t6 < v) && (t7 > v) && (t8 < v)){
  211. JOptionPane.showMessageDialog(null, "Третья и четвартая опоры в критическом состоянии!");
  212. } else if((t1 > t) && (t2 < t) && (t3 < t) && (t4 < t) && (t5 < v) && (t6 < v) && (t7 < v) && (t8 < v)){
  213. JOptionPane.showMessageDialog(null, "Первая опора в критическом состоянии!");
  214. } else if((t1 < t) && (t2 > t) && (t3 < t) && (t4 < t) && (t5 < v) && (t6 < v) && (t7 < v) && (t8 < v)){
  215. JOptionPane.showMessageDialog(null, "Вторая опора в критическом состоянии!");
  216. } else if((t1 < t) && (t2 < t) && (t3 > t) && (t4 < t) && (t5 < v) && (t6 < v) && (t7 < v) && (t8 < v)){
  217. JOptionPane.showMessageDialog(null, "Третья опора в критическом состоянии!");
  218. } else if((t1 < t) && (t2 < t) && (t3 < t) && (t4 > t) && (t5 < v) && (t6 < v) && (t7 < v) && (t8 < v)){
  219. JOptionPane.showMessageDialog(null, "Четвёртая опора в критическом состоянии!");
  220. } else if((t1 < t) && (t2 < t) && (t3 < t) && (t4 < t) && (t5 > v) && (t6 < v) && (t7 < v) && (t8 < v)){
  221. JOptionPane.showMessageDialog(null, "Первая опора в критическом состоянии!");
  222. } else if((t1 < t) && (t2 < t) && (t3 < t) && (t4 < t) && (t5 < v) && (t6 > v) && (t7 < v) && (t8 < v)){
  223. JOptionPane.showMessageDialog(null, "Вторая опора в критическом состоянии!");
  224. } else if((t1 < t) && (t2 < t) && (t3 < t) && (t4 < t) && (t5 < v) && (t6 < v) && (t7 > v) && (t8 < v)){
  225. JOptionPane.showMessageDialog(null, "Третья опора в критическом состоянии!");
  226. } else if((t1 < t) && (t2 < t) && (t3 < t) && (t4 < t) && (t5 < v) && (t6 < v) && (t7 < v) && (t8 > v)){
  227. JOptionPane.showMessageDialog(null, "Четвёртая опора в критическом состоянии!");
  228. } else if((t1 > t) && (t2 > t) && (t3 > t) && (t4 < t) && (t5 < v) && (t6 < v) && (t7 < v) && (t8 < v)){
  229. JOptionPane.showMessageDialog(null, "Первая, вторая и третья опоры в критическом состоянии!");
  230. } else if((t1 > t) && (t2 > t) && (t3 < t) && (t4 > t) && (t5 < v) && (t6 < v) && (t7 < v) && (t8 < v)){
  231. JOptionPane.showMessageDialog(null, "Первая, вторая и четвёртая опоры в критическом состоянии!");
  232. } else if((t1 > t) && (t2 < t) && (t3 > t) && (t4 > t) && (t5 < v) && (t6 < v) && (t7 < v) && (t8 < v)){
  233. JOptionPane.showMessageDialog(null, "Первая, третья и четвёртая опоры в критическом состоянии!");
  234. } else if((t1 < t) && (t2 > t) && (t3 > t) && (t4 < t) && (t5 < v) && (t6 < v) && (t7 < v) && (t8 < v)){
  235. JOptionPane.showMessageDialog(null, "Вторая, третья и четвёртая опоры в критическом состоянии!");
  236. } else if((t1 < t) && (t2 < t) && (t3 < t) && (t4 < t) && (t5 > v) && (t6 > v) && (t7 > v) && (t8 < v)){
  237. JOptionPane.showMessageDialog(null, "Первая, вторая и третья опоры в критическом состоянии!");
  238. } else if((t1 < t) && (t2 < t) && (t3 < t) && (t4 < t) && (t5 > v) && (t6 > v) && (t7 < v) && (t8 > v)){
  239. JOptionPane.showMessageDialog(null, "Первая, вторая и четвёртая опоры в критическом состоянии!");
  240. } else if((t1 < t) && (t2 < t) && (t3 < t) && (t4 < t) && (t5 > v) && (t6 < v) && (t7 > v) && (t8 > v)){
  241. JOptionPane.showMessageDialog(null, "Первая, третья и четвёртая опоры в критическом состоянии!");
  242. } else if((t1 < t) && (t2 < t) && (t3 < t) && (t4 < t) && (t5 < v) && (t6 > v) && (t7 > v) && (t8 > v)){
  243. JOptionPane.showMessageDialog(null, "Вторая, третья и четвёртая опоры в критическом состоянии!");
  244. }
  245. else {
  246. JOptionPane.showMessageDialog(null, "Агрегат в критическом состоянии!");
  247. }
  248. N = Math.sqrt(Math.pow(Double.parseDouble(textField1.getText())/t, 2) + Math.pow(Double.parseDouble(textField2.getText())/t, 2) + Math.pow(Double.parseDouble(textField3.getText())/t, 2) + Math.pow(Double.parseDouble(textField4.getText())/t, 2) + Math.pow(Double.parseDouble(textField5.getText())/v, 2) + Math.pow(Double.parseDouble(textField6.getText())/v, 2) + Math.pow(Double.parseDouble(textField7.getText())/v, 2) + Math.pow(Double.parseDouble(textField8.getText())/v, 2));
  249.  
  250.  
  251. //Инициализация БД
  252. java.util.Date date = new Date();
  253. SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy.MM.dd");
  254. conn = connectDB();
  255. try{
  256. Statement statement = conn.createStatement();
  257. statement.execute("CREATE TABLE IF NOT EXISTS BOOKS (DATA VARCHAR(30), N INT, VIBRO INT, PIRO INT); ");
  258. PreparedStatement statement1 = conn.prepareStatement("INSERT INTO BOOKS (DATA, N, VIBRO, PIRO) VALUES (?,?,?,?);");
  259. statement1.setString(1, simpleDateFormat.format(date));
  260. statement1.setDouble(2, N);
  261. statement1.setInt(3, t5);
  262. statement1.setInt(4, t1);
  263. statement1.execute();
  264. PreparedStatement statement2 = conn.prepareStatement("INSERT INTO BOOKS (DATA, N, VIBRO, PIRO) VALUES (?,?,?,?);");
  265. statement2.setString(1, simpleDateFormat.format(date));
  266. statement2.setDouble(2, N);
  267. statement2.setInt(3, t6);
  268. statement2.setInt(4, t2);
  269. statement2.execute();
  270. PreparedStatement statement3 = conn.prepareStatement("INSERT INTO BOOKS (DATA, N, VIBRO, PIRO) VALUES (?,?,?,?);");
  271. statement3.setString(1, simpleDateFormat.format(date));
  272. statement3.setDouble(2, N);
  273. statement3.setInt(3, t7);
  274. statement3.setInt(4, t3);
  275. statement3.execute();
  276. PreparedStatement statement4 = conn.prepareStatement("INSERT INTO BOOKS (DATA, N, VIBRO, PIRO) VALUES (?,?,?,?);");
  277. statement4.setString(1, simpleDateFormat.format(date));
  278. statement4.setDouble(2, N);
  279. statement4.setInt(3, t8);
  280. statement4.setInt(4, t4);
  281. statement4.execute();
  282. System.out.println("Данные добавлены в базу!");
  283. } catch (SQLException e) {
  284. System.out.println("Can't get connection: " + e.getMessage());
  285. }
  286.  
  287.  
  288. }
  289.  
  290.  
  291.  
  292.  
  293. }
  294.  
  295. import javafx.application.Application;
  296. import javafx.fxml.FXMLLoader;
  297. import javafx.scene.Group;
  298. import javafx.scene.Parent;
  299. import javafx.scene.Scene;
  300. import javafx.scene.layout.BorderPane;
  301. import javafx.stage.Stage;
  302.  
  303.  
  304. public class Main extends Application {
  305.  
  306.  
  307.  
  308. Stage primaryStage;
  309.  
  310.  
  311. @Override
  312. public void start(Stage primaryStage) throws Exception{
  313. this.primaryStage = primaryStage;
  314. Group group = new Group();
  315.  
  316. Parent content = FXMLLoader.load(getClass().getResource("sample.fxml"));
  317. BorderPane root = new BorderPane();
  318. root.setCenter(content);
  319. group.getChildren().add(root);
  320. primaryStage.setTitle("Комплексная система контроля технического сотояния насосного оборудования СК");
  321. primaryStage.setScene(new Scene(group,987,813));
  322. primaryStage.show();
  323. primaryStage.setOnCloseRequest(event -> primaryStage.close());
  324.  
  325.  
  326.  
  327. }
  328.  
  329.  
  330. public static void main(String[] args) {
  331. launch(args);
  332. }
  333. }
  334.  
  335. <?xml version="1.0" encoding="UTF-8"?>
  336.  
  337. <?import javafx.scene.control.*?>
  338. <?import javafx.scene.layout.*?>
  339.  
  340.  
  341. <AnchorPane prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1"
  342. fx:controller="Controller">
  343. <TextField fx:id="textField1" layoutX="82.0" layoutY="82.0" prefHeight="25.0" prefWidth="182.0"
  344. AnchorPane.leftAnchor="82.0"/>
  345. <TextField fx:id="textField5" layoutX="379.0" layoutY="82.0" prefHeight="25.0" prefWidth="182.0"
  346. AnchorPane.rightAnchor="72.0"/>
  347. <TextField fx:id="textField2" layoutX="82.0" layoutY="144.0" prefHeight="25.0" prefWidth="182.0"/>
  348. <TextField fx:id="textField6" layoutX="346.0" layoutY="144.0" prefHeight="25.0" prefWidth="182.0"/>
  349. <TextField fx:id="textField3" layoutX="82.0" layoutY="205.0" prefHeight="25.0" prefWidth="182.0"/>
  350. <TextField fx:id="textField7" layoutX="346.0" layoutY="205.0" prefHeight="25.0" prefWidth="182.0"/>
  351. <TextField fx:id="textField4" layoutX="82.0" layoutY="269.0" prefHeight="25.0" prefWidth="182.0"/>
  352. <TextField fx:id="textField8" layoutX="346.0" layoutY="269.0" prefHeight="25.0" prefWidth="182.0"/>
  353. <Button fx:id="button" layoutX="81.0" layoutY="325.0" mnemonicParsing="false" onAction="#result" prefHeight="38.0"
  354. prefWidth="449.0" text="Рассчитать!"/>
  355. <Label layoutX="82.0" layoutY="44.0" prefHeight="17.0" prefWidth="165.0" text="Введите значение вибрации:"/>
  356. <Label layoutX="346.0" layoutY="44.0" prefHeight="17.0" prefWidth="182.0" text="Введите значение температуры:"/>
  357. </AnchorPane>
  358.  
  359. Exception in thread "JavaFX Application Thread" java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
  360. at javafx.fxml.FXMLLoader$MethodHandler.invoke(FXMLLoader.java:1774)
  361. at javafx.fxml.FXMLLoader$ControllerMethodEventHandler.handle(FXMLLoader.java:1657)
  362. at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
  363. at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
  364. at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
  365. at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
  366. at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
  367. at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
  368. at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
  369. at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
  370. at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
  371. at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
  372. at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
  373. at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:49)
  374. at javafx.event.Event.fireEvent(Event.java:198)
  375. at javafx.scene.Node.fireEvent(Node.java:8413)
  376. at javafx.scene.control.Button.fire(Button.java:185)
  377. at com.sun.javafx.scene.control.behavior.ButtonBehavior.mouseReleased(ButtonBehavior.java:182)
  378. at com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.handle(BehaviorSkinBase.java:96)
  379. at com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.handle(BehaviorSkinBase.java:89)
  380. at com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(CompositeEventHandler.java:218)
  381. at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:80)
  382. at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
  383. at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
  384. at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
  385. at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
  386. at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
  387. at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
  388. at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
  389. at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
  390. at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
  391. at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
  392. at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
  393. at javafx.event.Event.fireEvent(Event.java:198)
  394. at javafx.scene.Scene$MouseHandler.process(Scene.java:3757)
  395. at javafx.scene.Scene$MouseHandler.access$1500(Scene.java:3485)
  396. at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1762)
  397. at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2494)
  398. at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:381)
  399. at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:295)
  400. at java.security.AccessController.doPrivileged(Native Method)
  401. at com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$354(GlassViewEventHandler.java:417)
  402. at com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:389)
  403. at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:416)
  404. at com.sun.glass.ui.View.handleMouseEvent(View.java:555)
  405. at com.sun.glass.ui.View.notifyMouse(View.java:937)
  406. at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
  407. at com.sun.glass.ui.win.WinApplication.lambda$null$148(WinApplication.java:191)
  408. at java.lang.Thread.run(Thread.java:748)
  409. Caused by: java.lang.reflect.InvocationTargetException
  410. at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  411. at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  412. at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  413. at java.lang.reflect.Method.invoke(Method.java:498)
  414. at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71)
  415. at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
  416. at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  417. at java.lang.reflect.Method.invoke(Method.java:498)
  418. at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:275)
  419. at javafx.fxml.FXMLLoader$MethodHandler.invoke(FXMLLoader.java:1769)
  420. ... 48 more
  421. Caused by: javafx.fxml.LoadException:
  422. /C:/Users/%d0%95%d0%ba%d0%b0%d1%82%d0%b5%d1%80%d0%b8%d0%bd%d0%b0/IdeaProjects/Vibro/out/production/Vibro/res.fxml
  423.  
  424. at javafx.fxml.FXMLLoader.constructLoadException(FXMLLoader.java:2601)
  425. at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2579)
  426. at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2441)
  427. at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2409)
  428. at Controller.press(Controller.java:97)
  429. ... 58 more
  430. Caused by: java.lang.NullPointerException
  431. at Controller.initialize(Controller.java:78)
  432. at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2548)
  433. ... 61 more
  434.  
  435. Process finished with exit code 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement