static void enableSubmitButton(Component form) { swing { JButton btn = findSubmitButton(form); if (btn != null) btn.setEnabled(true); } }