сжал стрелочки...
This commit is contained in:
parent
f217bdcff2
commit
fc4e673492
@ -5,16 +5,20 @@ import javafx.fxml.FXMLLoader;
|
|||||||
import javafx.scene.Scene;
|
import javafx.scene.Scene;
|
||||||
import javafx.stage.Stage;
|
import javafx.stage.Stage;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
public class ApplicationMissileCruiser extends Application {
|
public class ApplicationMissileCruiser extends Application {
|
||||||
@Override
|
@Override
|
||||||
public void start(Stage stage) throws IOException {
|
public void start(Stage stage) throws IOException {
|
||||||
FXMLLoader fxmlLoader = new FXMLLoader(ApplicationMissileCruiser.class.getResource("ViewMissileCruiser.fxml"));
|
FXMLLoader fxmlLoader = new FXMLLoader(ApplicationMissileCruiser.class.getResource("ViewMissileCruiser.fxml"));
|
||||||
|
|
||||||
Scene scene = new Scene(fxmlLoader.load(), 200, 200);
|
Scene scene = new Scene(fxmlLoader.load(), 900, 500);
|
||||||
|
|
||||||
stage.setTitle("Ракетный крейсер");
|
stage.setTitle("Ракетный крейсер");
|
||||||
stage.setScene(scene);
|
stage.setScene(scene);
|
||||||
|
stage.setResizable(false);
|
||||||
|
|
||||||
stage.show();
|
stage.show();
|
||||||
}
|
}
|
||||||
|
@ -1,19 +1,16 @@
|
|||||||
package kvr.missilecruiser_hard;
|
package kvr.missilecruiser_hard;
|
||||||
|
|
||||||
import javafx.fxml.FXML;
|
import javafx.fxml.FXML;
|
||||||
import javafx.scene.control.Label;
|
|
||||||
|
|
||||||
public class ControllerMissileCruiser {
|
|
||||||
@FXML
|
|
||||||
private Label welcomeText;
|
|
||||||
|
|
||||||
@FXML
|
|
||||||
protected void onHelloButtonClick() {
|
|
||||||
welcomeText.setText("Welcome to JavaFX Application!");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
public class ControllerMissileCruiser
|
||||||
|
{
|
||||||
@FXML
|
@FXML
|
||||||
protected void buttonCreate_Click() {
|
protected void buttonCreate_Click() {
|
||||||
welcomeText.setText("buttonCreate_Click");
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@FXML
|
||||||
|
protected void buttonsMove_Click() {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,5 +1,8 @@
|
|||||||
package kvr.missilecruiser_hard;
|
package kvr.missilecruiser_hard;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
public class Main {
|
public class Main {
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
|
||||||
|
BIN
src/main/resources/arrowDown.png
Normal file
BIN
src/main/resources/arrowDown.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.6 KiB |
BIN
src/main/resources/arrowLeft.png
Normal file
BIN
src/main/resources/arrowLeft.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.6 KiB |
BIN
src/main/resources/arrowRight.png
Normal file
BIN
src/main/resources/arrowRight.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.6 KiB |
BIN
src/main/resources/arrowUp.png
Normal file
BIN
src/main/resources/arrowUp.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.6 KiB |
@ -1,11 +1,22 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
<?import javafx.scene.control.Button?>
|
<?import javafx.scene.control.Button?>
|
||||||
|
<?import javafx.scene.image.Image?>
|
||||||
|
<?import javafx.scene.image.ImageView?>
|
||||||
<?import javafx.scene.layout.AnchorPane?>
|
<?import javafx.scene.layout.AnchorPane?>
|
||||||
|
<?import javafx.scene.text.Font?>
|
||||||
|
|
||||||
<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="500.0" prefWidth="900.0" xmlns="http://javafx.com/javafx/null" xmlns:fx="http://javafx.com/fxml/1" fx:controller="kvr.missilecruiser_hard.ControllerMissileCruiser">
|
<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="500.0" prefWidth="900.0" xmlns="http://javafx.com/javafx/null" xmlns:fx="http://javafx.com/fxml/1" fx:controller="kvr.missilecruiser_hard.ControllerMissileCruiser">
|
||||||
<children>
|
<children>
|
||||||
<Button layoutX="14.0" layoutY="461.0" mnemonicParsing="false" onAction="#buttonCreate_Click" text="Создать" />
|
<Button layoutX="14.0" layoutY="457.0" mnemonicParsing="false" onAction="#buttonCreate_Click" prefHeight="30.0" prefWidth="98.0" text="Создать">
|
||||||
|
<font>
|
||||||
|
<Font size="14.0" />
|
||||||
|
</font></Button>
|
||||||
|
<Button layoutX="846.0" layoutY="447.0" mnemonicParsing="false" onAction="#buttonsMove_Click" prefHeight="40.0" prefWidth="40.0" style="-fx-background-image: url("arrowRight.png"); -fx-background-size: 85%; -fx-background-position: center; -fx-background-repeat: space; -fx-effect: bhb;" />
|
||||||
|
<ImageView fitHeight="40.0" fitWidth="40.0" layoutX="346.0" layoutY="204.0">
|
||||||
|
<image>
|
||||||
|
<Image url="@../../arrowLeft.png" />
|
||||||
|
</image>
|
||||||
|
</ImageView>
|
||||||
</children>
|
</children>
|
||||||
</AnchorPane>
|
</AnchorPane>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user