some changes in lab 5

This commit is contained in:
ekallin 2023-11-21 12:30:54 +04:00
parent 2c212498fc
commit cd64afbf92
3 changed files with 7 additions and 5 deletions

View File

@ -34,6 +34,7 @@ public class FormLocomotiveCollections {
public FormLocomotiveCollections() {
formElectricLocomotive = new FormElectricLocomotive();
formLocomotiveConfig = new FormLocomotiveConfig();
_storage = new LocomotivesGenericStorage(400,300);
_stackRemoveObjects = new Stack<>();
listBoxStorage.addListSelectionListener(this::listBoxObjectsSelectedIndexChanged);
@ -73,10 +74,11 @@ public class FormLocomotiveCollections {
FrameLocomotiveConfig frameLocomotiveConfig = new FrameLocomotiveConfig();
frameLocomotiveConfig.setVisible(true);
frameLocomotiveConfig._formLocomotiveConfig.buttonOk.addActionListener(e2 ->{
frameLocomotiveConfig.dispose();
//loco = frameLocomotiveConfig._formLocomotiveConfig.
});
// FrameElectricLocomotive frameElectricLocomotive = new FrameElectricLocomotive();
// FrameElectricLocomotive frameElectricLocomotive = new FrameElectricLocomotive();
// frameElectricLocomotive.setVisible(true);
// frameElectricLocomotive._formElectricLocomotive.ButtonSelectLocomotive.addActionListener(e2 -> {
// loco = frameElectricLocomotive._formElectricLocomotive._drawingLocomotive;

View File

@ -6,9 +6,9 @@
<xy x="20" y="20" width="980" height="500"/>
</constraints>
<properties>
<maximumSize width="980" height="500"/>
<minimumSize width="980" height="500"/>
<preferredSize width="980" height="500"/>
<maximumSize width="900" height="400"/>
<minimumSize width="900" height="400"/>
<preferredSize width="900" height="400"/>
<requestFocusEnabled value="true"/>
</properties>
<border type="none"/>

View File

@ -27,7 +27,7 @@ public class FormLocomotiveConfig {
public FormLocomotiveConfig()
{
// MainPanel.setPreferredSize(new Dimension(980, 500));
MainPanel.setPreferredSize(new Dimension(900, 400));
pictureBoxObject.setPreferredSize(new Dimension(300, 300)); // почему только на это реагируем, а?
// groupBoxObjectParameters.setPreferredSize(new Dimension(600,400));
// groupBoxColors.setPreferredSize(new Dimension(210,200));