Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Username = new JTextField(20);
- Sendmsg = new JTextField(20);
- Sendmsg.addActionListener(this);
- Conversation = new JTextArea(30, 70);
- Conversation.setEditable(false);
- JPanel username = new JPanel();
- username.setLayout(new BorderLayout());
- username.setBorder(new TitledBorder("Username"));
- username.add(Username, BorderLayout.NORTH);
- JPanel sendmsg = new JPanel();
- sendmsg.setLayout(new BorderLayout());
- sendmsg.setBorder(new TitledBorder("Message"));
- sendmsg.add(Sendmsg, BorderLayout.NORTH);
- JScrollPane scrollPane = new JScrollPane(Conversation);
- JPanel convo = new JPanel();
- convo.setLayout(new BorderLayout());
- convo.setBorder(new TitledBorder("Conversation"));
- convo.add(scrollPane, BorderLayout.SOUTH);
- add(username);
- add(sendmsg);
- add(convo);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement