|
|
@ -129,7 +129,7 @@ public class ChatClient extends JFrame implements KeyListener { |
|
|
|
JPanel emojiPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT)); |
|
|
|
emojiButton = new JButton("😀"); |
|
|
|
emojiButton.setPreferredSize(new Dimension(50, 50)); |
|
|
|
|
|
|
|
emojiButton.addActionListener(e -> showEmojiPicker()); |
|
|
|
inputPanel.add(emojiPanel, BorderLayout.LINE_END); |
|
|
|
|
|
|
|
add(outputScrollPane, BorderLayout.CENTER); |
|
|
@ -140,6 +140,13 @@ public class ChatClient extends JFrame implements KeyListener { |
|
|
|
setDefaultCloseOperation(EXIT_ON_CLOSE); |
|
|
|
setLocationRelativeTo(null); |
|
|
|
} |
|
|
|
|
|
|
|
private void showEmojiPicker() { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void receiveMessages() { |
|
|
|
try { |
|
|
|
connectionToServer = new Socket(address, Constants.PORT); |
|
|
|