From 1ebf64559b01740a0ac13346cf72e52c72e762fb Mon Sep 17 00:00:00 2001 From: Hugo Hirsch Date: Fri, 3 May 2024 23:02:34 +0200 Subject: [PATCH] Fix equals, log and typo --- src/main/java/de/aikiit/fotorenamer/ApplicationStarter.java | 2 +- src/main/java/de/aikiit/fotorenamer/gui/HelpWindow.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/de/aikiit/fotorenamer/ApplicationStarter.java b/src/main/java/de/aikiit/fotorenamer/ApplicationStarter.java index 058b3a4a7..8ba86c6a8 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 55513e0d1..a07cad2d5 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); }