getContentPane().add(centerPanel, BorderLayout.CENTER);
HelpedLabel label1 = new HelpedLabel(Translator.getTranslation("Company"), "company", helpFile, view);
centerPanel.add(label1);
comboBox = new DataComboBox(new JdbcTable("Company", 1, view), false, "company", helpFile, view);
comboBox.setMaximumSize(new Dimension(accountNameFieldSize, accountNameFieldSize));
comboBox.setMinimumSize(new Dimension(accountNameFieldSize / 2, 1));
centerPanel.add(comboBox);
comboBox.loadComboBox("Name", "CompId", new Integer(0));
comboBox.addItem("--- " + Translator.getTranslation("All") + " ---");
//select the default company
JdbcTable aa = new JdbcTable("Company", 1, view);
try {
aa.setObject(new Integer(
SetupInfo.getProperty(SetupInfo.DEFAULT_COMPANY)),
"CompId");
if (aa.GetFirstRecord()) {
comboBox.setSelectedItemFromKey((Integer)
aa.getObject("CompId", null));
}
} catch (Exception ex) {
comboBox.setSelectedItem("");
/*
* just clear the dialog