готовые кнопки
1
.gitignore
vendored
@ -1,4 +1,5 @@
|
||||
# ---> VisualStudioCode
|
||||
*.class
|
||||
.vscode/*
|
||||
!.vscode/settings.json
|
||||
!.vscode/tasks.json
|
||||
|
@ -1,6 +1,3 @@
|
||||
import java.awt.*;
|
||||
import java.net.URL;
|
||||
|
||||
import javax.swing.*;
|
||||
|
||||
public class FormWarmlyLocomotive extends JFrame {
|
||||
@ -19,43 +16,43 @@ public class FormWarmlyLocomotive extends JFrame {
|
||||
|
||||
//createButton
|
||||
JButton createButton = new JButton("Создать");
|
||||
createButton.setBounds(20, 420, 90, 25);
|
||||
createButton.setBounds(10, 420, 90, 30);
|
||||
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);
|
||||
ImageIcon imgUp = new ImageIcon("Resources\\UpArrow.png");
|
||||
upButton.setIcon(imgUp);
|
||||
upButton.setSize(30,30);
|
||||
upButton.setLocation(810,385);
|
||||
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);
|
||||
ImageIcon imgDn = new ImageIcon("Resources\\DownArrow.png");
|
||||
downButton.setIcon(imgDn);
|
||||
downButton.setSize(30 ,30);
|
||||
downButton.setLocation(810, 420);
|
||||
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);
|
||||
ImageIcon imgRt = new ImageIcon("Resources\\RightArrow.png");
|
||||
rightButton.setIcon(imgRt);
|
||||
rightButton.setSize(30, 30);
|
||||
rightButton.setLocation(845, 420);
|
||||
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);
|
||||
ImageIcon imgLt = new ImageIcon("Resources\\LeftArrow.png");
|
||||
leftButton.setIcon(imgLt);
|
||||
leftButton.setSize(30, 30);
|
||||
leftButton.setLocation(775, 420);
|
||||
pictureBox.add(leftButton);
|
||||
|
||||
add(pictureBox);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 933 B |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 907 B |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 922 B |
Before Width: | Height: | Size: 922 B After Width: | Height: | Size: 989 B |