готовые кнопки

This commit is contained in:
Данил Лопатин 2024-02-19 09:09:39 +03:00
parent 4a8486316f
commit 21cf202793
6 changed files with 19 additions and 21 deletions

1
.gitignore vendored
View File

@ -1,4 +1,5 @@
# ---> VisualStudioCode # ---> VisualStudioCode
*.class
.vscode/* .vscode/*
!.vscode/settings.json !.vscode/settings.json
!.vscode/tasks.json !.vscode/tasks.json

View File

@ -1,6 +1,3 @@
import java.awt.*;
import java.net.URL;
import javax.swing.*; import javax.swing.*;
public class FormWarmlyLocomotive extends JFrame { public class FormWarmlyLocomotive extends JFrame {
@ -19,43 +16,43 @@ public class FormWarmlyLocomotive extends JFrame {
//createButton //createButton
JButton createButton = new JButton("Создать"); JButton createButton = new JButton("Создать");
createButton.setBounds(20, 420, 90, 25); createButton.setBounds(10, 420, 90, 30);
pictureBox.add(createButton); pictureBox.add(createButton);
//upButton //upButton
//ImageIcon img1 = new ImageIcon("Resources/UpArrow.png");
JButton upButton = new JButton(); JButton upButton = new JButton();
//upButton.setIcon(img1); ImageIcon imgUp = new ImageIcon("Resources\\UpArrow.png");
//upButton.setPreferredSize(new Dimension(30, 30)); upButton.setIcon(imgUp);
upButton.setBounds(810, 385, 30, 30); upButton.setSize(30,30);
upButton.setLocation(810,385);
pictureBox.add(upButton); pictureBox.add(upButton);
//downButton //downButton
//ImageIcon img1 = new ImageIcon("Resources/UpArrow.png");
JButton downButton = new JButton(); JButton downButton = new JButton();
//upButton.setIcon(img1); ImageIcon imgDn = new ImageIcon("Resources\\DownArrow.png");
//upButton.setPreferredSize(new Dimension(30, 30)); downButton.setIcon(imgDn);
downButton.setBounds(810, 420, 30, 30); downButton.setSize(30 ,30);
downButton.setLocation(810, 420);
pictureBox.add(downButton); pictureBox.add(downButton);
//rightButton //rightButton
//ImageIcon img1 = new ImageIcon("Resources/UpArrow.png");
JButton rightButton = new JButton(); JButton rightButton = new JButton();
//upButton.setIcon(img1); ImageIcon imgRt = new ImageIcon("Resources\\RightArrow.png");
//upButton.setPreferredSize(new Dimension(30, 30)); rightButton.setIcon(imgRt);
rightButton.setBounds(845, 420, 30, 30); rightButton.setSize(30, 30);
rightButton.setLocation(845, 420);
pictureBox.add(rightButton); pictureBox.add(rightButton);
//downButton //downButton
//ImageIcon img1 = new ImageIcon("Resources/UpArrow.png");
JButton leftButton = new JButton(); JButton leftButton = new JButton();
//upButton.setIcon(img1); ImageIcon imgLt = new ImageIcon("Resources\\LeftArrow.png");
//upButton.setPreferredSize(new Dimension(30, 30)); leftButton.setIcon(imgLt);
leftButton.setBounds(775, 420, 30, 30); leftButton.setSize(30, 30);
leftButton.setLocation(775, 420);
pictureBox.add(leftButton); pictureBox.add(leftButton);
add(pictureBox); add(pictureBox);
} }
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 933 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 907 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 922 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 922 B

After

Width:  |  Height:  |  Size: 989 B