diff --git a/src/main/java/EmojiPicker.java b/src/main/java/EmojiPicker.java index ad93e6a..8d9f330 100644 --- a/src/main/java/EmojiPicker.java +++ b/src/main/java/EmojiPicker.java @@ -3,15 +3,22 @@ import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; +/** + * A panel containing a selection of emoji buttons to be used in conjunction with a JTextField. + */ + public class EmojiPicker extends JPanel { - private JTextField textField; + private JTextField textField; // Text field to append selected emoji + // Array containing a selection of emojis private static final String[] emojis = {"😀", "😃", "😄", "😁", "😆", "😅", "😂", "🤣", "😊", "😇", "🙂", "🙃"}; - - + /** + * Constructs an EmojiPicker with a specified JTextField. + * @param textField The JTextField to append selected emojis. + */ public EmojiPicker(JTextField textField) { setLayout(new GridLayout(4, 3, 5, 5));