From 48a78f41dd28eb87e30200bfd9eeb18b8cb2a805 Mon Sep 17 00:00:00 2001 From: Alena Bandarovich Date: Wed, 7 Feb 2024 20:03:26 +0100 Subject: [PATCH] Refactor: open window in the center --- src/main/java/ChatClient.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/ChatClient.java b/src/main/java/ChatClient.java index 2cfdfd0..fbc9b4e 100644 --- a/src/main/java/ChatClient.java +++ b/src/main/java/ChatClient.java @@ -46,6 +46,7 @@ public class ChatClient extends JFrame implements KeyListener { setVisible(true); setSize(WINDOW_WIDTH, WINDOW_HEIGHT); setDefaultCloseOperation(EXIT_ON_CLOSE); + setLocationRelativeTo(null); } private void receiveMessages() { try {