반응형
package com.wooriclient;
--*
* 채팅 방GUI
--
import java.awt.BorderLayout;
import java.awt.EventQueue;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JScrollPane;
import javax.swing.JTextPane;
import java.awt.TextField;
import javax.swing.JButton;
public class woorichat extends JFrame {
private JPanel contentPane;
--*
* Launch the application.
--
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
public void run() {
try {
woorichat frame = new woorichat();
frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
}
});
}
--*
* Create the frame.
--
public woorichat() {
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setBounds(100, 100, 352, 454);
contentPane = new JPanel();
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
setContentPane(contentPane);
contentPane.setLayout(null);
JPanel panel = new JPanel();
panel.setBounds(0, 0, 336, 377);
contentPane.add(panel);
panel.setLayout(null);
JTextPane textPaneChat = new JTextPane();
textPaneChat.setEditable(false);
textPaneChat.setBounds(0, 0, 336, 377);
panel.add(textPaneChat);
TextField txtWrite = new TextField();
txtWrite.setBounds(10, 383, 235, 29);
contentPane.add(txtWrite);
JButton btnNewButton = new JButton("send");
btnNewButton.setBounds(251, 387, 85, 23);
contentPane.add(btnNewButton);
}
}
반응형
'SpringBoot' 카테고리의 다른 글
자바 (continue label,향상된 for,variable arguments) 사용법 (0) | 2014.10.18 |
---|---|
채팅프로그램(방채팅_GUI) (0) | 2013.02.20 |
채팅프로그램(로그인시친구목록_GUI) (0) | 2013.02.20 |
채팅프로그램(로그인 GUI 부분) (0) | 2013.02.20 |
채팅프로그램(회원가입_GUI부분) (0) | 2013.02.20 |