From ad72a8166ce70a279f6d09fdbcf3ca0f45b78508 Mon Sep 17 00:00:00 2001 From: Valentin Spiroski Date: Fri, 9 Feb 2024 21:36:26 +0100 Subject: [PATCH] Emoji Button in ChatClient --- src/main/java/ChatClient.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/ChatClient.java b/src/main/java/ChatClient.java index bbfc218..46bdc1a 100644 --- a/src/main/java/ChatClient.java +++ b/src/main/java/ChatClient.java @@ -126,6 +126,11 @@ public class ChatClient extends JFrame implements KeyListener { inputPanel.add(inputTextField, BorderLayout.CENTER); emojiPicker = new EmojiPicker(inputTextField); + JPanel emojiPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT)); + emojiButton = new JButton("😀"); + emojiButton.setPreferredSize(new Dimension(50, 50)); + + inputPanel.add(emojiPanel, BorderLayout.LINE_END); add(outputScrollPane, BorderLayout.CENTER); add(inputTextField, BorderLayout.PAGE_END);