setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
this.getContentPane().setLayout(Layout.getGBL());
initializeComponents();
final DcModule module = DcModules.get(moduleIdx);
JPanel panelActions = getActionPanel(module, readonly);
addInputPanels();
addChildrenPanel();
addPictureTabs();
addRelationPanel();
if (module.canBeLend() && SecurityCentre.getInstance().getUser().isAuthorized("Loan") && update && !readonly) {
addLoanTab();
}
getContentPane().add(tabbedPane, Layout.getGBC(0, 0, 1, 1, 1.0, 1.0
,GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH,
new Insets(0,0,15,0), 0, 0));
getContentPane().add(panelActions, Layout.getGBC(0, 1, 1, 1, 0.0, 0.0
,GridBagConstraints.SOUTHEAST, GridBagConstraints.NONE,
new Insets(5, 5, 5, 5), 0, 0));
setRequiredFields();
setReadonly(readonly);
setData(dco, true, false);
pack();
applySettings();
setCenteredLocation();
addWindowListener(new WindowAdapter() {
@Override
public void windowOpened(WindowEvent we) {
try {
for (DcFieldDefinition definition : module.getFieldDefinitions().getDefinitions()) {
int index = definition.getIndex();
DcField field = dco.getField(index);
JComponent component = fields.get(field);
if (component == null)