|
|
@ -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); |
|
|
|
} |
|
|
|
}} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|