diff --git a/src/main/java/de/aikiit/fotorenamer/ApplicationStarter.java b/src/main/java/de/aikiit/fotorenamer/ApplicationStarter.java index 058b3a4a..8ba86c6a 100644 --- a/src/main/java/de/aikiit/fotorenamer/ApplicationStarter.java +++ b/src/main/java/de/aikiit/fotorenamer/ApplicationStarter.java @@ -45,7 +45,7 @@ public static void main(final String[] args) { UIManager.setLookAndFeel( UIManager.getCrossPlatformLookAndFeelClassName()); } catch (Exception e) { - LOG.error("Error during application startup: " + e); + LOG.error("Error during application startup", e); } MainUIWindow.build(); } diff --git a/src/main/java/de/aikiit/fotorenamer/gui/HelpWindow.java b/src/main/java/de/aikiit/fotorenamer/gui/HelpWindow.java index 55513e0d..a07cad2d 100755 --- a/src/main/java/de/aikiit/fotorenamer/gui/HelpWindow.java +++ b/src/main/java/de/aikiit/fotorenamer/gui/HelpWindow.java @@ -94,7 +94,7 @@ private void init() { this.pack(); ComponentGaugeUtil.makeCentered(this); - // let button get the focus, needs to be run in the and and async + // let button get the focus, needs to be run in the end and async SwingUtilities.invokeLater(() -> { getRootPane().setDefaultButton(endButton); endButton.requestFocusInWindow(); @@ -133,7 +133,7 @@ private void loadHelpContents(final JPanel base, final JEditorPane textfield) { * @param event Event to react on in this UI-component. */ public final void actionPerformed(final ActionEvent event) { - if (event.getSource() == this.endButton) { + if (this.endButton.equals(event.getSource())) { LOG.debug("Disabling visibility of helpWindow."); setVisible(false); }