[#2152] Fix table column width changing
This commit is contained in:
parent
6084ba6512
commit
3a41ea40e3
@ -25,6 +25,8 @@ public class MotorMountConfigurationPanel extends JPanel {
|
|||||||
table.setShowVerticalLines(false);
|
table.setShowVerticalLines(false);
|
||||||
table.setRowSelectionAllowed(false);
|
table.setRowSelectionAllowed(false);
|
||||||
table.setColumnSelectionAllowed(false);
|
table.setColumnSelectionAllowed(false);
|
||||||
|
table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
|
||||||
|
table.setAutoCreateColumnsFromModel(false);
|
||||||
|
|
||||||
TableColumnModel columnModel = table.getColumnModel();
|
TableColumnModel columnModel = table.getColumnModel();
|
||||||
TableColumn col0 = columnModel.getColumn(0);
|
TableColumn col0 = columnModel.getColumn(0);
|
||||||
|
@ -24,7 +24,7 @@ class MotorMountTableModel extends AbstractTableModel implements ComponentChange
|
|||||||
private final Rocket rocket;
|
private final Rocket rocket;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param motorConfigurationPanel
|
* @param rocket the rocket to select motor mounts from
|
||||||
*/
|
*/
|
||||||
MotorMountTableModel( Rocket rocket) {
|
MotorMountTableModel( Rocket rocket) {
|
||||||
this.rocket = rocket;
|
this.rocket = rocket;
|
||||||
|
@ -76,7 +76,7 @@ public class MotorConfigurationPanel extends FlightConfigurablePanel<MotorMount>
|
|||||||
BorderFactory.createEtchedBorder(),
|
BorderFactory.createEtchedBorder(),
|
||||||
"<html><b>" + trans.get("lbl.motorMounts") + "</b></html>"));
|
"<html><b>" + trans.get("lbl.motorMounts") + "</b></html>"));
|
||||||
|
|
||||||
MotorMountConfigurationPanel mountConfigPanel = new MotorMountConfigurationPanel(this, rocket);
|
MotorMountConfigurationPanel mountConfigPanel = new MotorMountConfigurationPanel(subpanel, rocket);
|
||||||
subpanel.add(mountConfigPanel, "grow, pushy");
|
subpanel.add(mountConfigPanel, "grow, pushy");
|
||||||
this.add(subpanel, "split, growy, pushy");
|
this.add(subpanel, "split, growy, pushy");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user