6869707172737475
public void actionPerformed(ActionEvent e) { Date date = datePicker.getDate(); if (date != null) { editor.setText(Util.easyDateFormat(date)); // Set focus to editor component after changing its text: new FocusRequester(editor.getTextComponent()); } }
6869707172737475767778
tf.setName("tf"); // add action to reset-button. resets tf and requests focus reset.addActionListener(new AbstractAction() { public void actionPerformed(ActionEvent event) { tf.setText(""); new FocusRequester(tf); } }); JPanel main = new JPanel(); main.setLayout(gbl);
169170171172173174175176177
} if (frame.getTabbedPane().getTabCount() > 0) { sidePaneManager.toggle(fetcherTitle); if (sidePaneManager.isComponentVisible(fetcherTitle)) { new FocusRequester(getTextField()); } } }
203204205206207208209
EntryEditor editor = panel.getEntryEditor(entry); if (mode != BasePanel.SHOWING_EDITOR) { panel.showEntryEditor(editor); panel.adjustSplitter(); } new FocusRequester(editor); }
420421422423424425426
if (previewActive) panel.showPreview(preview); else panel.hideBottomComponent(); panel.adjustSplitter(); new FocusRequester(table); }
272273274275276277278
getContentPane().add(mainPanel, BorderLayout.CENTER); getContentPane().add(optionsPanel, BorderLayout.SOUTH); this.setSize(getSize()); pack(); Util.placeDialog(this, owner); new FocusRequester(table); }