фиксик

This commit is contained in:
Вячеслав Иванов 2023-11-11 22:53:51 +04:00
parent 35d781923f
commit 4b1b74674c
2 changed files with 4 additions and 4 deletions

View File

@ -31,7 +31,7 @@ public class HardGeneric <T extends EntityBus,U extends IDraw> {
pictureBoxWidth = width;
}
public boolean insertBus(T bus) {
public boolean Add(T bus) {
if (bus == null) {
return false;
}
@ -42,7 +42,7 @@ public class HardGeneric <T extends EntityBus,U extends IDraw> {
return true;
}
public boolean insertDoor(U door) {
public boolean Add(U door) {
if (door == null) {
return false;
}

View File

@ -59,8 +59,8 @@ public class HardForm extends JFrame {
HardGeneric<EntityBus, IDraw> objectGenerator = new HardGeneric<>(size, size, pictureBoxWidth, pictureBoxHeight);
for (int i = 0; i < size; i++) {
EntityBus ent = createRandomEntityBus();
objectGenerator.insertBus(ent);
objectGenerator.insertDoor(createDrawningDoor());
objectGenerator.Add(ent);
objectGenerator.Add(createDrawningDoor());
}
createObjectButton.addActionListener(
new ActionListener() {