From cb787c7e25cbddf728e1a256340d5227e7118c1b Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Sun, 30 Jul 2017 21:25:21 -0700 Subject: [PATCH] Focus on the text field on startup. --- src/main/java/org/nwapw/abacus/window/Window.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/org/nwapw/abacus/window/Window.java b/src/main/java/org/nwapw/abacus/window/Window.java index 40081ea..79749f9 100644 --- a/src/main/java/org/nwapw/abacus/window/Window.java +++ b/src/main/java/org/nwapw/abacus/window/Window.java @@ -247,4 +247,9 @@ public class Window extends JFrame { }); } + @Override + public void setVisible(boolean b) { + super.setVisible(b); + if(b) inputField.requestFocusInWindow(); + } }