готовые кнопки
This commit is contained in:
parent
4139b082ae
commit
4a8486316f
@ -1,3 +1,3 @@
|
|||||||
public enum DirectionType {
|
public enum DirectionType {
|
||||||
Up, Down, Right, Left;
|
Up, Down, Right, Left
|
||||||
}
|
};
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
|
import java.awt.*;
|
||||||
|
import java.net.URL;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
|
|
||||||
public class FormWarmlyLocomotive extends JFrame {
|
public class FormWarmlyLocomotive extends JFrame {
|
||||||
|
|
||||||
public void Initialize(){
|
public void Initialize(){
|
||||||
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||||||
setSize(900, 500);
|
setSize(900, 500);
|
||||||
@ -18,9 +22,40 @@ public class FormWarmlyLocomotive extends JFrame {
|
|||||||
createButton.setBounds(20, 420, 90, 25);
|
createButton.setBounds(20, 420, 90, 25);
|
||||||
pictureBox.add(createButton);
|
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);
|
add(pictureBox);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
BIN
WarmlyLocomotive/src/Resources/DownArrow.png
Normal file
BIN
WarmlyLocomotive/src/Resources/DownArrow.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.0 KiB |
BIN
WarmlyLocomotive/src/Resources/LeftArrow.png
Normal file
BIN
WarmlyLocomotive/src/Resources/LeftArrow.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.0 KiB |
BIN
WarmlyLocomotive/src/Resources/RightArrow.png
Normal file
BIN
WarmlyLocomotive/src/Resources/RightArrow.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.0 KiB |
BIN
WarmlyLocomotive/src/Resources/UpArrow.png
Normal file
BIN
WarmlyLocomotive/src/Resources/UpArrow.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 922 B |
Loading…
x
Reference in New Issue
Block a user