use of com.jgoodies.forms.util.DefaultUnitConverter in project jgnash by ccavanaugh.
the class BudgetWizardDialog method initComponents.
private void initComponents() {
okButton = new JButton(rb.getString("Button.Ok"));
cancelButton = new JButton(rb.getString("Button.Cancel"));
budgetPeriodCombo = new JComboBox<>();
budgetPeriodCombo.setModel(new DefaultComboBoxModel<>(Period.values()));
budgetPeriodCombo.setSelectedItem(Period.MONTHLY);
budgetNameField = new JTextField();
DefaultUnitConverter unitConverter = DefaultUnitConverter.getInstance();
helpPane = new JEditorPane();
helpPane.setEditable(false);
helpPane.setEditorKit(new StyledEditorKit());
helpPane.setBackground(getBackground());
helpPane.setText(TextResource.getString("NewBudgetOne.txt"));
helpPane.setPreferredSize(new Dimension(unitConverter.dialogUnitXAsPixel(DLU_X, helpPane), unitConverter.dialogUnitYAsPixel(DLU_Y, helpPane)));
roundButton = new JCheckBox(rb.getString("Button.RoundToWhole"));
okButton.addActionListener(this);
cancelButton.addActionListener(this);
}
Aggregations