first lab complete
This commit is contained in:
parent
62b3b3129e
commit
ab78753f83
@ -6,6 +6,7 @@ import java.util.random.RandomGenerator;
|
|||||||
public class DrawningPlane extends JPanel {
|
public class DrawningPlane extends JPanel {
|
||||||
|
|
||||||
private EntityPlane Plane;
|
private EntityPlane Plane;
|
||||||
|
|
||||||
public EntityPlane GetPlane(){
|
public EntityPlane GetPlane(){
|
||||||
return Plane;
|
return Plane;
|
||||||
}
|
}
|
||||||
|
@ -15,9 +15,9 @@ public class FormPlane {
|
|||||||
private JButton ButtonRight;
|
private JButton ButtonRight;
|
||||||
protected DrawningPlane PictureBoxPlane;
|
protected DrawningPlane PictureBoxPlane;
|
||||||
private JToolBar StatusStrip;
|
private JToolBar StatusStrip;
|
||||||
private JLabel JLabelSpeed = new JLabel();
|
private final JLabel JLabelSpeed = new JLabel();
|
||||||
private JLabel JLabelWeight = new JLabel();
|
private final JLabel JLabelWeight = new JLabel();
|
||||||
private JLabel JLabelColor = new JLabel();
|
private final JLabel JLabelColor = new JLabel();
|
||||||
public void Draw() {
|
public void Draw() {
|
||||||
if (PictureBoxPlane.GetPlane() == null) {
|
if (PictureBoxPlane.GetPlane() == null) {
|
||||||
return;
|
return;
|
||||||
|
@ -3,7 +3,7 @@ import javax.swing.*;
|
|||||||
public class Main {
|
public class Main {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
JFrame frame = new JFrame("Корабль");
|
JFrame frame = new JFrame("Самолёт");
|
||||||
frame.setContentPane(new FormPlane().Mainpanel);
|
frame.setContentPane(new FormPlane().Mainpanel);
|
||||||
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||||||
frame.setLocation(500, 200);
|
frame.setLocation(500, 200);
|
||||||
|
Loading…
Reference in New Issue
Block a user