diff --git a/WarmlyLocomotive/src/DirectionType.java b/WarmlyLocomotive/src/DirectionType.java index dcdeeef..65f4cb4 100644 --- a/WarmlyLocomotive/src/DirectionType.java +++ b/WarmlyLocomotive/src/DirectionType.java @@ -1,3 +1,3 @@ public enum DirectionType { - Up, Down, Right, Left; -} + Up, Down, Right, Left +}; diff --git a/WarmlyLocomotive/src/FormWarmlyLocomotive.java b/WarmlyLocomotive/src/FormWarmlyLocomotive.java index 1179023..7d06c52 100644 --- a/WarmlyLocomotive/src/FormWarmlyLocomotive.java +++ b/WarmlyLocomotive/src/FormWarmlyLocomotive.java @@ -1,6 +1,10 @@ +import java.awt.*; +import java.net.URL; + import javax.swing.*; public class FormWarmlyLocomotive extends JFrame { + public void Initialize(){ setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setSize(900, 500); @@ -17,10 +21,41 @@ public class FormWarmlyLocomotive extends JFrame { JButton createButton = new JButton("Создать"); createButton.setBounds(20, 420, 90, 25); pictureBox.add(createButton); - + + //upButton + //ImageIcon img1 = new ImageIcon("Resources/UpArrow.png"); + JButton upButton = new JButton(); + //upButton.setIcon(img1); + //upButton.setPreferredSize(new Dimension(30, 30)); + upButton.setBounds(810, 385, 30, 30); + pictureBox.add(upButton); + + //downButton + //ImageIcon img1 = new ImageIcon("Resources/UpArrow.png"); + JButton downButton = new JButton(); + //upButton.setIcon(img1); + //upButton.setPreferredSize(new Dimension(30, 30)); + downButton.setBounds(810, 420, 30, 30); + pictureBox.add(downButton); + + //rightButton + //ImageIcon img1 = new ImageIcon("Resources/UpArrow.png"); + JButton rightButton = new JButton(); + //upButton.setIcon(img1); + //upButton.setPreferredSize(new Dimension(30, 30)); + rightButton.setBounds(845, 420, 30, 30); + pictureBox.add(rightButton); + + //downButton + //ImageIcon img1 = new ImageIcon("Resources/UpArrow.png"); + JButton leftButton = new JButton(); + //upButton.setIcon(img1); + //upButton.setPreferredSize(new Dimension(30, 30)); + leftButton.setBounds(775, 420, 30, 30); + pictureBox.add(leftButton); + add(pictureBox); } - } diff --git a/WarmlyLocomotive/src/Resources/DownArrow.png b/WarmlyLocomotive/src/Resources/DownArrow.png new file mode 100644 index 0000000..92f4637 Binary files /dev/null and b/WarmlyLocomotive/src/Resources/DownArrow.png differ diff --git a/WarmlyLocomotive/src/Resources/LeftArrow.png b/WarmlyLocomotive/src/Resources/LeftArrow.png new file mode 100644 index 0000000..99a7cfc Binary files /dev/null and b/WarmlyLocomotive/src/Resources/LeftArrow.png differ diff --git a/WarmlyLocomotive/src/Resources/RightArrow.png b/WarmlyLocomotive/src/Resources/RightArrow.png new file mode 100644 index 0000000..09c029b Binary files /dev/null and b/WarmlyLocomotive/src/Resources/RightArrow.png differ diff --git a/WarmlyLocomotive/src/Resources/UpArrow.png b/WarmlyLocomotive/src/Resources/UpArrow.png new file mode 100644 index 0000000..a9b82db Binary files /dev/null and b/WarmlyLocomotive/src/Resources/UpArrow.png differ