From c274059da48ca1abf1f1cc0c4cc5ae89b28bc70e Mon Sep 17 00:00:00 2001 From: Alena Bandarovich Date: Fri, 9 Feb 2024 11:52:18 +0100 Subject: [PATCH] ScrollPane for Note Panel --- src/main/java/ChatClient.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/ChatClient.java b/src/main/java/ChatClient.java index 5ede996..2328cb2 100644 --- a/src/main/java/ChatClient.java +++ b/src/main/java/ChatClient.java @@ -29,9 +29,9 @@ public class ChatClient extends JFrame implements KeyListener { setContentPane(root); - - - + jScrollPane = new JScrollPane( JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); + jScrollPane.setPreferredSize(new Dimension(300, 500)); + root.add(jScrollPane); } private JPanel setupPanel(String header) {