private void initComponents() { final Resource rb = Resource.get(); setTitle(rb.getString("Title.DefTranNum")); okButton = new JButton(rb.getString("Button.Ok")); cancelButton = new JButton(rb.getString("Button.Cancel")); insertButton = new JButton(rb.getString("Button.Insert")); removeButton = new JButton(rb.getString("Button.Remove")); upButton = new JButton(Resource.getIcon("/jgnash/resource/stock_up-16.png")); downButton = new JButton(Resource.getIcon("/jgnash/resource/stock_down-16.png")); insertButton.addActionListener(this); cancelButton.addActionListener(this); okButton.addActionListener(this); removeButton.addActionListener(this); upButton.addActionListener(this); downButton.addActionListener(this); model = new DefaultListModel<>(); final List<String> items = EngineFactory.getEngine(EngineFactory.DEFAULT).getTransactionNumberList(); for (String s : items) { model.addElement(s); } list = new JList<>(model); entryField = new JTextFieldEx(10); }
private void initComponents() { feeField = new JFloatField(account.getCurrencyNode()); feeButton = new JButton(Resource.getIcon("/jgnash/resource/document-properties.png")); feeButton.setMargin(new Insets(0, 0, 0, 0)); feeButton.addActionListener(this); feeButton.setFocusPainted(false); if (ThemeManager.isLookAndFeelNimbus()) { NimbusUtils.reduceNimbusButtonMargin(feeButton); feeButton.setIcon( NimbusUtils.scaleIcon(Resource.getIcon("/jgnash/resource/document-properties.png"))); } }