From dd55dca4a88da932223030ccc092d6d48d808001 Mon Sep 17 00:00:00 2001 From: Jen Warman Date: Sun, 3 Mar 2024 17:32:03 +0000 Subject: [PATCH] Cleanup --- .../com/willwinder/universalgcodesender/MacroHelper.java | 1 + .../{ => uielements/components}/RequestFocusListener.java | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) rename ugs-core/src/com/willwinder/universalgcodesender/{ => uielements/components}/RequestFocusListener.java (80%) diff --git a/ugs-core/src/com/willwinder/universalgcodesender/MacroHelper.java b/ugs-core/src/com/willwinder/universalgcodesender/MacroHelper.java index 4cec6a0192..6512a55066 100644 --- a/ugs-core/src/com/willwinder/universalgcodesender/MacroHelper.java +++ b/ugs-core/src/com/willwinder/universalgcodesender/MacroHelper.java @@ -22,6 +22,7 @@ This file is part of Universal Gcode Sender (UGS). import com.willwinder.universalgcodesender.model.BackendAPI; import com.willwinder.universalgcodesender.model.Position; import com.willwinder.universalgcodesender.services.KeyboardService; +import com.willwinder.universalgcodesender.uielements.components.RequestFocusListener; import com.willwinder.universalgcodesender.utils.GUIHelpers; import net.miginfocom.swing.MigLayout; import org.apache.commons.lang3.RegExUtils; diff --git a/ugs-core/src/com/willwinder/universalgcodesender/RequestFocusListener.java b/ugs-core/src/com/willwinder/universalgcodesender/uielements/components/RequestFocusListener.java similarity index 80% rename from ugs-core/src/com/willwinder/universalgcodesender/RequestFocusListener.java rename to ugs-core/src/com/willwinder/universalgcodesender/uielements/components/RequestFocusListener.java index 980afcc5c4..741b4ba1ad 100644 --- a/ugs-core/src/com/willwinder/universalgcodesender/RequestFocusListener.java +++ b/ugs-core/src/com/willwinder/universalgcodesender/uielements/components/RequestFocusListener.java @@ -1,4 +1,4 @@ -package com.willwinder.universalgcodesender; +package com.willwinder.universalgcodesender.uielements.components; import java.awt.Component; import java.awt.Window; @@ -8,6 +8,11 @@ import java.awt.event.WindowEvent; import javax.swing.SwingUtilities; +/** + * Used for focusing a field in an JOptionDialog. + * + * Source from: https://tips4java.wordpress.com/2010/03/14/dialog-focus/ + */ public class RequestFocusListener implements HierarchyListener { @Override