From c0a154c9fbbdcc30be7d5930b7fb82a972def6e0 Mon Sep 17 00:00:00 2001 From: Valentin Spiroski Date: Fri, 9 Feb 2024 20:23:51 +0100 Subject: [PATCH] EmojiACtionListener --- src/main/java/EmojiPicker.java | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/src/main/java/EmojiPicker.java b/src/main/java/EmojiPicker.java index f4ad1d5..89fd7fb 100644 --- a/src/main/java/EmojiPicker.java +++ b/src/main/java/EmojiPicker.java @@ -11,13 +11,26 @@ public class EmojiPicker extends JPanel { public EmojiPicker(JTextField textField) { - setLayout(new GridLayout(4, 3, 5, 5)); // Adjust grid layout parameters as needed - - + setLayout(new GridLayout(4, 3, 5, 5)); + + + + setPreferredSize(new Dimension(300, 200)); + } + private class EmojiActionListener implements ActionListener { + + private String emoji; - } + @Override + public void actionPerformed(ActionEvent e) { + + System.out.println("Selected emoji: " + emoji); + textField.setText(textField.getText() + emoji); + } + }} +