Добавление картинок на кнопки
This commit is contained in:
parent
01959c9850
commit
2d676c0a0a
@ -14,9 +14,7 @@
|
||||
<children>
|
||||
<grid id="cfb06" binding="drawPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="2" col-span="3" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false">
|
||||
<preferred-size width="24" height="376"/>
|
||||
</grid>
|
||||
<grid row="0" column="0" row-span="2" col-span="3" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<background color="-4473925"/>
|
||||
@ -40,21 +38,33 @@
|
||||
<text value="Создать"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="f4d6e" class="javax.swing.JButton" binding="buttonRight">
|
||||
<constraints>
|
||||
<grid row="1" column="3" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<icon value="Right.png"/>
|
||||
<text value=""/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="12974" class="javax.swing.JButton" binding="buttonUp">
|
||||
<constraints>
|
||||
<grid row="0" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<enabled value="true"/>
|
||||
<text value="UP"/>
|
||||
<hideActionText value="true"/>
|
||||
<icon value="Up.png"/>
|
||||
<text value=""/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="c8778" class="javax.swing.JButton" binding="buttonDown">
|
||||
<component id="da478" class="javax.swing.JButton" binding="buttonDown">
|
||||
<constraints>
|
||||
<grid row="1" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text value="DOWN"/>
|
||||
<icon value="Down.png"/>
|
||||
<text value=""/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="43d8e" class="javax.swing.JButton" binding="buttonLeft">
|
||||
@ -62,18 +72,11 @@
|
||||
<grid row="1" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text value="LEFT"/>
|
||||
<icon value="Left.png"/>
|
||||
<text value=""/>
|
||||
<visible value="true"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="f4d6e" class="javax.swing.JButton" binding="buttonRight">
|
||||
<constraints>
|
||||
<grid row="1" column="3" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text value="RIGHT"/>
|
||||
</properties>
|
||||
</component>
|
||||
</children>
|
||||
</grid>
|
||||
<component id="2cd31" class="javax.swing.JLabel" binding="labelSpeed">
|
||||
|
@ -18,7 +18,6 @@ public class FormCar extends JFrame{
|
||||
private JLabel labelWeight;
|
||||
private JLabel labelColor;
|
||||
|
||||
|
||||
private DrawingArmoredCar armoredCar;
|
||||
|
||||
public FormCar() {
|
||||
@ -26,7 +25,6 @@ public class FormCar extends JFrame{
|
||||
setBounds(100, 100, 700, 700);
|
||||
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||||
|
||||
|
||||
addComponentListener(new ComponentAdapter() {
|
||||
public void componentResized(ComponentEvent componentEvent) {
|
||||
if (armoredCar != null) {
|
||||
@ -40,6 +38,9 @@ public class FormCar extends JFrame{
|
||||
labelWeight.setText("Вес: ");
|
||||
labelColor.setText("Цвет: ");
|
||||
|
||||
|
||||
|
||||
|
||||
Canvas canvas = new Canvas();
|
||||
drawPanel.add(canvas);
|
||||
|
||||
|
BIN
src/main/resources/Down.png
Normal file
BIN
src/main/resources/Down.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 20 KiB |
BIN
src/main/resources/Left.png
Normal file
BIN
src/main/resources/Left.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 20 KiB |
BIN
src/main/resources/Right.png
Normal file
BIN
src/main/resources/Right.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 20 KiB |
BIN
src/main/resources/Up.png
Normal file
BIN
src/main/resources/Up.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
Loading…
Reference in New Issue
Block a user