Search in sources :

Example 1 with DefaultUnitConverter

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);
}
Also used : StyledEditorKit(javax.swing.text.StyledEditorKit) JCheckBox(javax.swing.JCheckBox) JButton(javax.swing.JButton) JEditorPane(javax.swing.JEditorPane) DefaultUnitConverter(com.jgoodies.forms.util.DefaultUnitConverter) Dimension(java.awt.Dimension) JTextField(javax.swing.JTextField)

Aggregations

DefaultUnitConverter (com.jgoodies.forms.util.DefaultUnitConverter)1 Dimension (java.awt.Dimension)1 JButton (javax.swing.JButton)1 JCheckBox (javax.swing.JCheckBox)1 JEditorPane (javax.swing.JEditorPane)1 JTextField (javax.swing.JTextField)1 StyledEditorKit (javax.swing.text.StyledEditorKit)1