{"id":309681,"date":"2020-09-09T15:00:39","date_gmt":"2020-09-09T15:00:39","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=309681"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=309681","title":{"rendered":"\u041d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0434\u0435\u0441\u043a\u0442\u043e\u043f\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e JavaFX"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/518448\/\">\u0420\u0435\u0448\u0438\u043b \u044f \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0439 jar \u0444\u0430\u0439\u043b \u0441 \u0443\u0434\u043e\u0431\u043d\u044b\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c \u0434\u043b\u044f \u0440\u0430\u0441\u0447\u0435\u0442\u0430 \u0441\u0432\u043e\u0438\u0445 \u043f\u043e\u0432\u0441\u0435\u0434\u043d\u0435\u0432\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447 \u043f\u043e \u0440\u0430\u0431\u043e\u0442\u0435. \u041d\u0430\u0447\u0430\u043b \u0441 \u0441\u0430\u043c\u044b\u0445 \u043f\u0440\u043e\u0441\u0442\u044b\u0445.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ro\/uz\/qo\/rouzqoalxhgz7vjf0wq_rojmlia.png\" alt=\"image\"><\/p>\n<p>  \u041d\u0443\u0436\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u044f \u043d\u0430 \u0441\u0434\u0432\u0438\u0433 \u0438\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u0442\u0438\u043f\u0430 \u0437\u0430\u043a\u0440\u0435\u043f\u043b\u0435\u043d\u0438\u044f \u0438 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f \u0441\u0442\u043e\u0440\u043e\u043d \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u043e\u0439 \u043f\u043b\u0430\u0441\u0442\u0438\u043d\u044b.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h3>\u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430, \u0430 \u0432 \u043f\u043e\u043c\u043e\u0449\u044c \u0432\u043e\u0437\u044c\u043c\u0435\u043c Scene Builder<\/h3>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0440\u0430\u0431\u043e\u0447\u0443\u044e \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0441 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c 900\u0445600.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/al\/nf\/mq\/alnfmq6_fmmo42ofvlprwf2xzec.png\" alt=\"image\"><\/p>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 c \u0440\u0430\u0437\u043c\u0435\u0440\u0430\u043c\u0438 \u0438 \u043e\u0442\u0441\u0442\u0443\u043f\u0430\u043c\u0438(\u044f \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0443 \u0434\u0435\u043b\u0430\u043b \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0430 \u043b\u0438\u0441\u0442\u043e\u0447\u043a\u0435, \u043d\u043e \u043b\u0438\u0441\u0442\u043e\u0447\u0435\u043a \u0443\u0436\u0435 \u043f\u043e\u0442\u0435\u0440\u044f\u043b\u0441\u044f). <\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/gm\/zw\/kp\/gmzwkpe2ratmpdpacpsdodhgozq.png\" alt=\"image\"><\/p>\n<h3>\u0414\u0430\u043b\u0435\u0435 \u043f\u0440\u043e\u0439\u0434\u0435\u043c\u0441\u044f \u043f\u043e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432<\/h3>\n<p>  <\/p>\n<ol>\n<li>\u041a\u043d\u043e\u043f\u043a\u0430 Button <br \/>  \u041f\u0440\u0438\u0441\u0432\u043e\u0438\u043c \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0435 \u0438\u043c\u044f \u043d\u0430\u0448\u0435\u0439 \u043a\u043d\u043e\u043f\u043a\u0438 \u0438 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u0430 \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043f\u043e\u0442\u043e\u043c \u0431\u0443\u0434\u0435\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u043d\u0430\u0448 \u043a\u043e\u0434\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/fr\/kf\/iz\/frkfizwiraq6a54ke6ysk0a7llg.png\" alt=\"image\">  <\/li>\n<li>\u041f\u043e\u043b\u0435 TextField <br \/>  \u041f\u0440\u0438\u0441\u0432\u043e\u0438\u043c \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0435 \u0438\u043c\u044f \u043d\u0430\u0448\u0435\u043c\u0443 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u043c\u0443 \u043f\u043e\u043b\u044e. \u041f\u043e\u043b\u0435 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u0432\u0432\u043e\u0434\u0430\/\u0432\u044b\u0432\u043e\u0434\u0430 \u0447\u0438\u0441\u043b\u043e\u0432\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u0422\u0430\u043a \u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0438\u043c\u044f \u043f\u043e\u043b\u044e, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u0440\u0438 \u0432\u0432\u043e\u0434\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u043f\u0430\u0434\u0430\u0442\u044c\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ea\/x0\/gj\/eax0gjiy8nd-lcgecacfse39ggw.png\" alt=\"image\"><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/fw\/px\/p6\/fwpxp6pr5nfiptcwr5psbgnfs1c.png\" alt=\"image\">  <\/li>\n<li>\u041f\u043e\u043b\u0435 Label<br \/>  \u041f\u043e\u043b\u0435 Label \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0434\u043b\u044f \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u044f\u0447\u0435\u0435\u043a.  <\/li>\n<li>\u041f\u043e\u043b\u0435 Image<br \/>  \u0422\u0443\u0442 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0438\u043c\u044f \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u043d\u0430\u0445\u043e\u0434\u044f\u0449\u0438\u0439\u0441\u044f \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/0z\/_d\/fo\/0z_dfo2d05_qqzseh3mogwseoys.png\" alt=\"image\">  <\/li>\n<li>\u041f\u043e\u043b\u0435 CheckBox<br \/>  \u0422\u0443\u0442 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0435 \u0438\u043c\u044f. \u042d\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0442\u0438\u043f\u0430 \u0437\u0430\u043a\u0440\u0435\u043f\u043b\u0435\u043d\u0438\u044f\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/xc\/5h\/zs\/xc5hzsqvwf-btbckahxk-weth2c.png\" alt=\"image\">  <\/li>\n<\/ol>\n<p>  \u041a\u043e\u043d\u0435\u0447\u043d\u044b\u0439 \u043a\u043e\u0434 \u0444\u0430\u0439\u043b\u0430 sample.fxml<\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041b\u0438\u0441\u0442\u0438\u043d\u0433 sample.fxml<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;  &lt;?import javafx.scene.control.Button?&gt; &lt;?import javafx.scene.control.CheckBox?&gt; &lt;?import javafx.scene.control.Label?&gt; &lt;?import javafx.scene.control.TextField?&gt; &lt;?import javafx.scene.image.Image?&gt; &lt;?import javafx.scene.image.ImageView?&gt; &lt;?import javafx.scene.layout.GridPane?&gt; &lt;?import javafx.scene.layout.Pane?&gt; &lt;?import javafx.scene.layout.VBox?&gt;  &lt;Pane prefHeight=&quot;600.0&quot; prefWidth=&quot;900.0&quot; xmlns=&quot;http:\/\/javafx.com\/javafx\/8.0.112&quot; xmlns:fx=&quot;http:\/\/javafx.com\/fxml\/1&quot; fx:controller=&quot;sample.Controller&quot;&gt;     &lt;children&gt;       &lt;Button fx:id=&quot;button&quot; layoutX=&quot;40.0&quot; layoutY=&quot;200.0&quot; mnemonicParsing=&quot;false&quot; onAction=&quot;#showDateTime&quot; prefHeight=&quot;71.0&quot; prefWidth=&quot;528.0&quot; text=&quot;=&quot; \/&gt;        &lt;VBox layoutX=&quot;312.0&quot; layoutY=&quot;20.0&quot; minHeight=&quot;-Infinity&quot; minWidth=&quot;-Infinity&quot; prefHeight=&quot;200.0&quot; prefWidth=&quot;280.0&quot; GridPane.columnIndex=&quot;1&quot;&gt;          &lt;children&gt;             &lt;TextField fx:id=&quot;myTextField1&quot; promptText=&quot;\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0430&quot; \/&gt;             &lt;TextField fx:id=&quot;myTextField2&quot; promptText=&quot;\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 b (\u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0430\u044f \u0441\u0442\u043e\u0440\u043e\u043d\u0430)&quot; \/&gt;             &lt;TextField fx:id=&quot;myTextField3&quot; promptText=&quot;\u0422\u043e\u043b\u0449\u0438\u043d\u0430&quot; \/&gt;             &lt;TextField fx:id=&quot;myTextField4&quot; prefHeight=&quot;25.0&quot; prefWidth=&quot;280.0&quot; promptText=&quot;\u041c\u043e\u0434\u0443\u043b\u044c \u0443\u043f\u0440\u0443\u0433\u043e\u0441\u0442\u0438 \u0415&quot; \/&gt;             &lt;TextField fx:id=&quot;myTextField6&quot; prefHeight=&quot;25.0&quot; prefWidth=&quot;280.0&quot; promptText=&quot;\u0414\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u044f&quot; \/&gt;          &lt;\/children&gt;       &lt;\/VBox&gt;       &lt;VBox layoutX=&quot;611.0&quot; prefHeight=&quot;562.0&quot; prefWidth=&quot;271.0&quot; GridPane.columnIndex=&quot;21&quot;&gt;          &lt;children&gt;             &lt;ImageView fx:id=&quot;image&quot; fitHeight=&quot;116.0&quot; fitWidth=&quot;174.0&quot; pickOnBounds=&quot;true&quot; preserveRatio=&quot;true&quot;&gt;                &lt;image&gt;                   &lt;Image url=&quot;@Zadelka1.PNG&quot; \/&gt;                &lt;\/image&gt;&lt;\/ImageView&gt;             &lt;CheckBox fx:id=&quot;checkbox1&quot; mnemonicParsing=&quot;false&quot; text=&quot;\u0412\u0441\u0435 \u043a\u0440\u0430\u044f \u0437\u0430\u0449\u0435\u043c\u043b\u0435\u043d\u044b&quot; \/&gt;             &lt;ImageView fitHeight=&quot;122.0&quot; fitWidth=&quot;237.0&quot; layoutX=&quot;30.0&quot; pickOnBounds=&quot;true&quot; preserveRatio=&quot;true&quot;&gt;                &lt;image&gt;                   &lt;Image url=&quot;@Zadelka2.PNG&quot; \/&gt;                &lt;\/image&gt;&lt;\/ImageView&gt;             &lt;CheckBox fx:id=&quot;checkbox2&quot; mnemonicParsing=&quot;false&quot; text=&quot;\u0428\u0430\u0440\u043d\u0438\u0440 \u043f\u043e \u0432\u0435\u0440\u0445\u043d\u0438\u043c  \u0438 \u043d\u0438\u0436\u043d\u0438\u043c \u043a\u0440\u043e\u043c\u043a\u0430\u043c&quot; \/&gt;             &lt;ImageView fitHeight=&quot;127.0&quot; fitWidth=&quot;272.0&quot; pickOnBounds=&quot;true&quot; preserveRatio=&quot;true&quot;&gt;                &lt;image&gt;                   &lt;Image url=&quot;@Zadelka3.PNG&quot; \/&gt;                &lt;\/image&gt;&lt;\/ImageView&gt;             &lt;CheckBox fx:id=&quot;checkbox3&quot; mnemonicParsing=&quot;false&quot; text=&quot;\u0428\u0430\u0440\u043d\u0438\u0440 \u043f\u043e \u0431\u043e\u043a\u0430\u043c&quot; \/&gt;             &lt;ImageView fitHeight=&quot;129.0&quot; fitWidth=&quot;392.0&quot; pickOnBounds=&quot;true&quot; preserveRatio=&quot;true&quot;&gt;                &lt;image&gt;                   &lt;Image url=&quot;@Zadelka4.PNG&quot; \/&gt;                &lt;\/image&gt;&lt;\/ImageView&gt;             &lt;CheckBox fx:id=&quot;checkbox4&quot; mnemonicParsing=&quot;false&quot; text=&quot;\u0428\u0430\u0440\u043d\u0438\u0440 \u043a\u0440\u0443\u0433\u043e\u043c&quot; \/&gt;          &lt;\/children&gt;       &lt;\/VBox&gt;              &lt;VBox layoutX=&quot;20.0&quot; layoutY=&quot;20.0&quot; minHeight=&quot;-Infinity&quot; minWidth=&quot;-Infinity&quot; prefHeight=&quot;200.0&quot; prefWidth=&quot;262.0&quot;&gt;          &lt;children&gt;             &lt;Label prefHeight=&quot;25.0&quot; prefWidth=&quot;185.0&quot; text=&quot;\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 a&quot; \/&gt;             &lt;Label prefHeight=&quot;25.0&quot; prefWidth=&quot;262.0&quot; text=&quot;\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 b (\u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0430\u044f \u0441\u0442\u043e\u0440\u043e\u043d\u0430)&quot; \/&gt;             &lt;Label prefHeight=&quot;25.0&quot; prefWidth=&quot;188.0&quot; text=&quot;\u0422\u043e\u043b\u0449\u0438\u043d\u0430&quot; \/&gt;             &lt;Label prefHeight=&quot;25.0&quot; prefWidth=&quot;186.0&quot; text=&quot;\u041c\u043e\u0434\u0443\u043b\u044c \u0443\u043f\u0440\u0443\u0433\u043e\u0441\u0442\u0438 E&quot; \/&gt;             &lt;Label prefHeight=&quot;25.0&quot; prefWidth=&quot;188.0&quot; text=&quot;\u0414\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u044f&quot; \/&gt;          &lt;\/children&gt;       &lt;\/VBox&gt;       &lt;VBox layoutX=&quot;312.0&quot; layoutY=&quot;311.0&quot; prefHeight=&quot;200.0&quot; prefWidth=&quot;280.0&quot;&gt;          &lt;children&gt;             &lt;TextField fx:id=&quot;myTextField5&quot; prefHeight=&quot;25.0&quot; prefWidth=&quot;280.0&quot; promptText=&quot;\u041a\u0430\u0441\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u044f(\u043a\u0440)&quot; \/&gt;             &lt;TextField fx:id=&quot;myTextField7&quot; prefHeight=&quot;25.0&quot; prefWidth=&quot;280.0&quot; promptText=&quot;\u0417\u0430\u043f\u0430\u0441 \u043f\u0440\u043e\u0447\u043d\u043e\u0441\u0442\u0438&quot; \/&gt;          &lt;\/children&gt;       &lt;\/VBox&gt;       &lt;VBox layoutX=&quot;20.0&quot; layoutY=&quot;310.0&quot; prefHeight=&quot;200.0&quot; prefWidth=&quot;262.0&quot;&gt;          &lt;children&gt;             &lt;Label prefHeight=&quot;25.0&quot; prefWidth=&quot;260.0&quot; text=&quot;\u041a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043a\u0430\u0441\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u044f&quot; \/&gt;             &lt;Label prefHeight=&quot;25.0&quot; prefWidth=&quot;187.0&quot; text=&quot;\u0417\u0430\u043f\u0430\u0441 \u043f\u0440\u043e\u0447\u043d\u043e\u0441\u0442\u0438&quot; \/&gt;          &lt;\/children&gt;       &lt;\/VBox&gt;    &lt;\/children&gt;    &lt;\/Pane&gt;<\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  <\/p>\n<h3>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0433\u043b\u0430\u0432\u043d\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 \u043a\u043b\u0430\u0441\u0441\u0430 Main<\/h3>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041a\u043b\u0430\u0441\u0441 Main<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">package sample;  import javafx.application.Application;  import javafx.fxml.FXMLLoader; import javafx.scene.Parent; import javafx.scene.Scene;  import javafx.stage.Stage;    public class Main extends Application  {      @Override      public void start(Stage primaryStage) {         try { \/\/\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 sample.fxml(\u043d\u0430\u0448 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441).\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043d\u0430\u0448\u0435\u0439 \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u0441\u0446\u0435\u043d             Parent root = FXMLLoader.load(getClass().getResource(&quot;sample.fxml&quot;));             primaryStage.setTitle(&quot;\u0427\u0438\u0441\u0442\u044b\u0439 \u0441\u0434\u0432\u0438\u0433&quot;);             primaryStage.setScene(new Scene(root));             primaryStage.show();          } catch(Exception e) {             e.printStackTrace();         }     }      public static void main(String[] args)  {         launch(args);     } } <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  <\/p>\n<h3>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043a\u043b\u0430\u0441\u0441\u0430 Controller.\u0421\u0430\u043c\u043e\u0435 \u0432\u0430\u0436\u043d\u043e\u0435 \u043f\u043e\u043c\u0435\u0447\u0435\u043d\u043e \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u043c\u0438<\/h3>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041a\u043b\u0430\u0441\u0441 Controller<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">ackage sample;  import javafx.fxml.FXML; import javafx.fxml.Initializable; import javafx.scene.control.Button; import javafx.scene.control.CheckBox; import javafx.scene.control.TextField; import javafx.stage.Stage;  import java.net.URL; import java.util.ResourceBundle;  import static java.lang.Double.NaN; import static java.lang.Double.parseDouble; import static java.lang.String.valueOf;   public class Controller extends TextField implements Initializable  {   \/\/\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0440\u0430\u0437\u043b\u0447\u0438\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c     @FXML     private TextField myTextField4;     @FXML     private TextField myTextField1;     @FXML     private TextField myTextField2;     @FXML     private TextField myTextField3;     @FXML     private TextField myTextField5;     @FXML     private TextField myTextField6;     @FXML     private TextField myTextField7;     @FXML     private CheckBox checkbox1;     @FXML     private CheckBox checkbox2;     @FXML     private CheckBox checkbox3;     @FXML     private CheckBox checkbox4;      private double k;     private double krit;     private double zapas;        @Override     public void initialize(URL location, ResourceBundle resources) {                  \/\/\u041f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0444\u0438\u043b\u044c\u0442\u0440\u0430 \u0434\u043b\u044f \u0432\u0432\u043e\u0434\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432         myTextField1.setTextFormatter(new AlphaNumericTextFormatter());         myTextField2.setTextFormatter(new AlphaNumericTextFormatter());         myTextField3.setTextFormatter(new AlphaNumericTextFormatter());         myTextField4.setTextFormatter(new AlphaNumericTextFormatter());         \/\/myTextField6.setTextFormatter(new AlphaNumericTextFormatter());     }      public void showDateTime() throws Exception {   \/\/\u041f\u0435\u0440\u0435\u0432\u043e\u0434 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 \u0447\u0438\u0441\u043b\u043e         Double a = parseDouble(myTextField1.getText());         Double b = parseDouble(myTextField2.getText());         Double t = parseDouble(myTextField3.getText());         Double e = parseDouble(myTextField4.getText());         Double c = b \/ a; \/\/\u0423\u0441\u043b\u043e\u0432\u0438\u044f \u0432\u044b\u0431\u043e\u0440\u0430 CheckBox \u0438 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f \u0441\u0442\u043e\u0440\u043e\u043d\u044b         if (checkbox1.isSelected()) {             if (c &lt;= 0.1) {                 k = 8;             } else if ((c &gt; 0.1) &amp;&amp; (c &lt;= 0.15)) {                 k = 8.5;             } else if ((c &gt; 0.15) &amp;&amp; (c &lt;= 0.2)) {                 k = 8.8;             } else if ((c &gt; 0.2) &amp;&amp; (c &lt;= 0.25)) {                 k = 9;             } else if ((c &gt; 0.25) &amp;&amp; (c &lt;= 0.30)) {                 k = 9.2;             } else if ((c &gt; 0.3) &amp;&amp; (c &lt;= 0.35)) {                 k = 9.5;             } else if ((c &gt; 0.35) &amp;&amp; (c &lt;= 0.40)) {                 k = 9.8;             } else if ((c &gt; 0.40) &amp;&amp; (c &lt;= 0.45)) {                 k = 10.3;             } else if ((c &gt; 0.45) &amp;&amp; (c &lt;= 0.50)) {                 k = 10.5;             } else if ((c &gt; 0.5) &amp;&amp; (c &lt;= 0.55)) {                 k = 10.8;             } else if ((c &gt; 0.55) &amp;&amp; (c &lt;= 0.6)) {                 k = 11;             } else if ((c &gt; 0.6) &amp;&amp; (c &lt;= 0.65)) {                 k = 11.5;             } else if ((c &gt; 0.65) &amp;&amp; (c &lt;= 0.7)) {                 k = 11.8;             } else if ((c &gt; 0.7) &amp;&amp; (c &lt;= 0.75)) {                 k = 12;             } else if ((c &gt; 0.75) &amp;&amp; (c &lt;= 0.8)) {                 k = 12.5;             } else if ((c &gt; 0.8) &amp;&amp; (c &lt;= 0.85)) {                 k = 12.8;             } else if ((c &gt; 0.85) &amp;&amp; (c &lt;= 0.9)) {                 k = 13;             } else if ((c &gt; 0.9) &amp;&amp; (c &lt;= 0.95)) {                 k = 13.5;             } else if ((c &gt; 0.95) &amp;&amp; (c &lt;= 1)) {                 k = 14;             }             krit = (k * e) \/ (Math.pow((b \/ t), 2));              String d = valueOf(krit);             \/\/\u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u0447\u0438\u0441\u043b\u0430 \u0432 \u0441\u0442\u0440\u043e\u043a\u0443             myTextField5.setText(d);             }             else if (checkbox2.isSelected()) {                 if (c &lt;= 0.1) {                     k = 8;                 } else if ((c &gt; 0.1) &amp;&amp; (c &lt;= 0.15)) {                     k = 8.2;                 } else if ((c &gt; 0.15) &amp;&amp; (c &lt;= 0.2)) {                     k = 8.4;                 } else if ((c &gt; 0.2) &amp;&amp; (c &lt;= 0.25)) {                     k = 8.5;                 } else if ((c &gt; 0.25) &amp;&amp; (c &lt;= 0.30)) {                     k = 8.6;                 } else if ((c &gt; 0.3) &amp;&amp; (c &lt;= 0.35)) {                     k = 8.7;                 } else if ((c &gt; 0.35) &amp;&amp; (c &lt;= 0.40)) {                     k = 8.9;                 } else if ((c &gt; 0.40) &amp;&amp; (c &lt;= 0.45)) {                     k = 9;                 } else if ((c &gt; 0.45) &amp;&amp; (c &lt;= 0.50)) {                     k = 9.2;                 } else if ((c &gt; 0.5) &amp;&amp; (c &lt;= 0.55)) {                     k = 9.4;                 } else if ((c &gt; 0.55) &amp;&amp; (c &lt;= 0.6)) {                     k = 9.5;                 } else if ((c &gt; 0.6) &amp;&amp; (c &lt;= 0.65)) {                     k = 9.7;                 } else if ((c &gt; 0.65) &amp;&amp; (c &lt;= 0.7)) {                     k = 10;                 } else if ((c &gt; 0.7) &amp;&amp; (c &lt;= 0.75)) {                     k = 10;                 } else if ((c &gt; 0.75) &amp;&amp; (c &lt;= 0.8)) {                     k = 10.2;                 } else if ((c &gt; 0.8) &amp;&amp; (c &lt;= 0.85)) {                     k = 10.5;                 } else if ((c &gt; 0.85) &amp;&amp; (c &lt;= 0.9)) {                     k = 10.6;                 } else if ((c &gt; 0.9) &amp;&amp; (c &lt;= 0.95)) {                     k = 11;                 } else if ((c &gt; 0.95) &amp;&amp; (c &lt;= 1)) {                     k = 11;                 }             krit = (k * e) \/ (Math.pow((b \/ t), 2));              String d = valueOf(krit);             myTextField5.setText(d);             }          else if (checkbox3.isSelected()) {             if (c &lt;= 0.1) {                 k = 4.9;             } else if ((c &gt; 0.1) &amp;&amp; (c &lt;= 0.15)) {                 k = 5.1;             } else if ((c &gt; 0.15) &amp;&amp; (c &lt;= 0.2)) {                 k = 5.2;             } else if ((c &gt; 0.2) &amp;&amp; (c &lt;= 0.25)) {                 k = 5.5;             } else if ((c &gt; 0.25) &amp;&amp; (c &lt;= 0.30)) {                 k = 5.8;             } else if ((c &gt; 0.3) &amp;&amp; (c &lt;= 0.35)) {                 k = 6;             } else if ((c &gt; 0.35) &amp;&amp; (c &lt;= 0.40)) {                 k = 6.2;             } else if ((c &gt; 0.40) &amp;&amp; (c &lt;= 0.45)) {                 k = 6.5;             } else if ((c &gt; 0.45) &amp;&amp; (c &lt;= 0.50)) {                 k = 6.9;             } else if ((c &gt; 0.5) &amp;&amp; (c &lt;= 0.55)) {                 k = 7;             } else if ((c &gt; 0.55) &amp;&amp; (c &lt;= 0.6)) {                 k = 7.5;             } else if ((c &gt; 0.6) &amp;&amp; (c &lt;= 0.65)) {                 k = 8;             } else if ((c &gt; 0.65) &amp;&amp; (c &lt;= 0.7)) {                 k = 8.2;             } else if ((c &gt; 0.7) &amp;&amp; (c &lt;= 0.75)) {                 k = 8.5;             } else if ((c &gt; 0.75) &amp;&amp; (c &lt;= 0.8)) {                 k = 9.1;             } else if ((c &gt; 0.8) &amp;&amp; (c &lt;= 0.85)) {                 k = 9.5;             } else if ((c &gt; 0.85) &amp;&amp; (c &lt;= 0.9)) {                 k = 10;             } else if ((c &gt; 0.9) &amp;&amp; (c &lt;= 0.95)) {                 k = 10.5;             } else if ((c &gt; 0.95) &amp;&amp; (c &lt;= 1)) {                 k = 11;             }             krit = (k * e) \/ (Math.pow((b \/ t), 2));              String d = valueOf(krit);             myTextField5.setText(d);         }         else if (checkbox4.isSelected()) {             if (c &lt;= 0.1) {                 k = 4.8;             } else if ((c &gt; 0.1) &amp;&amp; (c &lt;= 0.15)) {                 k = 5;             } else if ((c &gt; 0.15) &amp;&amp; (c &lt;= 0.2)) {                 k = 5;             } else if ((c &gt; 0.2) &amp;&amp; (c &lt;= 0.25)) {                 k = 5.1;             } else if ((c &gt; 0.25) &amp;&amp; (c &lt;= 0.30)) {                 k = 5.2;             } else if ((c &gt; 0.3) &amp;&amp; (c &lt;= 0.35)) {                 k = 5.4;             } else if ((c &gt; 0.35) &amp;&amp; (c &lt;= 0.40)) {                 k = 5.5;             } else if ((c &gt; 0.40) &amp;&amp; (c &lt;= 0.45)) {                 k = 5.6;             } else if ((c &gt; 0.45) &amp;&amp; (c &lt;= 0.50)) {                 k = 5.9;             } else if ((c &gt; 0.5) &amp;&amp; (c &lt;= 0.55)) {                 k = 6;             } else if ((c &gt; 0.55) &amp;&amp; (c &lt;= 0.6)) {                 k = 6.2;             } else if ((c &gt; 0.6) &amp;&amp; (c &lt;= 0.65)) {                 k = 6.5;             } else if ((c &gt; 0.65) &amp;&amp; (c &lt;= 0.7)) {                 k = 6.7;             } else if ((c &gt; 0.7) &amp;&amp; (c &lt;= 0.75)) {                 k = 7;             } else if ((c &gt; 0.75) &amp;&amp; (c &lt;= 0.8)) {                 k = 7.1;             } else if ((c &gt; 0.8) &amp;&amp; (c &lt;= 0.85)) {                 k = 7.4;             } else if ((c &gt; 0.85) &amp;&amp; (c &lt;= 0.9)) {                 k = 7.8;             } else if ((c &gt; 0.9) &amp;&amp; (c &lt;= 0.95)) {                 k = 8;             } else if ((c &gt; 0.95) &amp;&amp; (c &lt;= 1)) {                 k = 8.3;             }             krit = (k * e) \/ (Math.pow((b \/ t), 2));             String d = valueOf(krit);             myTextField5.setText(d);          }         Double f = parseDouble(myTextField6.getText());             zapas = krit\/f;             String g = valueOf(zapas);             myTextField7.setText(g);         }         }<\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0434\u0432\u0443\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0444\u0438\u043b\u044c\u0442\u0440\u0430 \u0432\u0432\u043e\u0434\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 (\u0418\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0431\u0443\u043a\u0432, \u0430 \u0442\u0430\u043a \u0436\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0432\u0432\u043e\u0434\u044b\/\u0432\u044b\u0432\u043e\u0434\u044b). \u0420\u0435\u0448\u0435\u043d\u0438\u044f \u043d\u0435 \u043c\u043e\u0435, \u0430 \u043d\u0430\u0448\u0435\u043b \u044f \u0435\u0433\u043e \u043d\u0430 stackoverflow.\u0418\u0437 \u0432\u0441\u0435\u0445 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0445 \u043e\u043d\u043e \u043c\u043d\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0441\u0430\u043c\u044b\u043c \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0438 \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u043c.<\/p>\n<p>  \u041a\u043b\u0430\u0441\u0441 AlphaNumericTextFormatter<\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041a\u043b\u0430\u0441\u0441 AlphaNumericTextFormatter<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">public class AlphaNumericTextFormatter extends TextFormatter&lt;String&gt; {      \/** The Constant ALPHA_NUMERIC_ONLY. *\/     \/\/private static final String ALPHA_NUMERIC_ONLY = &quot;^[a-zA-Z0-9]*$&quot;;     \/** MAKE NUMERIC ONLY **\/     private static final String DIGITS_ONLY = &quot;^[0-9.]*$&quot;;      \/**      * Instantiates a new alpha numeric text formatter.      *\/     public AlphaNumericTextFormatter() {         super(applyFilter(null));     }      \/**      * Instantiates a new alpha numeric text formatter.      *      * @param maxLength      *            the max length      *\/     public AlphaNumericTextFormatter(int maxLength) {         super(applyFilter(new MaxLengthTextFormatter(maxLength).getFilter()));     }      \/**      * Apply filter.      *      * @param filter      *            the filter      * @return the unary operator      *\/     private static UnaryOperator&lt;Change&gt; applyFilter(UnaryOperator&lt;Change&gt; filter) {         return change -&gt; {             if (change.getControlNewText() != null &amp;&amp; change.getControlNewText().matches(DIGITS_ONLY)) {                 if (filter != null) {                     filter.apply(change);                 }                 return change;             }             return null;         };     }  } <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u041a\u043b\u0430\u0441\u0441 MaxLengthTextFormatter<\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041b\u0438\u0441\u0442\u0438\u043d\u0433 \u043a\u043e\u0434\u0430<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\"> package sample;  import java.util.function.UnaryOperator; import javafx.scene.control.TextFormatter; import javafx.scene.control.TextFormatter.Change;  public class MaxLengthTextFormatter extends TextFormatter&lt;String&gt; {     private int maxLength;      public MaxLengthTextFormatter(final int maxLength) {         super(new UnaryOperator&lt;Change&gt;() {             public Change apply(Change change) {                 if (change.isDeleted()) {                     if (change.getControlNewText().length() &gt; maxLength) {                         change.setText(change.getText().substring(0, maxLength));                     }                 } else if (change.getControlText().length() + change.getText().length() &gt;= maxLength) {                     int maxPos = maxLength - change.getControlText().length();                     change.setText(change.getText().substring(0, maxPos));                 }                  return change;             }         });         this.maxLength = maxLength;     }      public int getMaxLength() {         return this.maxLength;     } } <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  <\/p>\n<h3>\u041d\u0443 \u0438 \u0432 \u043a\u043e\u043d\u0446\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f jar \u0444\u0430\u0439\u043b\u0430<\/h3>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/nx\/8v\/eq\/nx8veq1vbof22fypj22mtb0zjey.png\" alt=\"image\"><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/we\/zi\/hj\/wezihj380kmcwknjtflbjhcb-7k.png\" alt=\"image\"><\/p>\n<p>  \u041d\u0430 \u044d\u0442\u043e\u043c \u0432\u0441\u0435. \u0422\u0435\u043f\u0435\u0440\u044c \u0433\u043e\u0442\u043e\u0432 \u0444\u0430\u0439\u043b \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043b\u044e\u0431\u043e\u043c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435 \u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0439 java.<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/518448\/\"> https:\/\/habr.com\/ru\/post\/518448\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/518448\/\">\u0420\u0435\u0448\u0438\u043b \u044f \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0439 jar \u0444\u0430\u0439\u043b \u0441 \u0443\u0434\u043e\u0431\u043d\u044b\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c \u0434\u043b\u044f \u0440\u0430\u0441\u0447\u0435\u0442\u0430 \u0441\u0432\u043e\u0438\u0445 \u043f\u043e\u0432\u0441\u0435\u0434\u043d\u0435\u0432\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447 \u043f\u043e \u0440\u0430\u0431\u043e\u0442\u0435. \u041d\u0430\u0447\u0430\u043b \u0441 \u0441\u0430\u043c\u044b\u0445 \u043f\u0440\u043e\u0441\u0442\u044b\u0445.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ro\/uz\/qo\/rouzqoalxhgz7vjf0wq_rojmlia.png\" alt=\"image\"><\/p>\n<p>  \u041d\u0443\u0436\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u044f \u043d\u0430 \u0441\u0434\u0432\u0438\u0433 \u0438\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u0442\u0438\u043f\u0430 \u0437\u0430\u043a\u0440\u0435\u043f\u043b\u0435\u043d\u0438\u044f \u0438 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f \u0441\u0442\u043e\u0440\u043e\u043d \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u043e\u0439 \u043f\u043b\u0430\u0441\u0442\u0438\u043d\u044b.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-309681","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/309681","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=309681"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/309681\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=309681"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=309681"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=309681"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}