자바 RMI 로 구현한 채팅프로그램입니다..
본 자료는 미리보기를 지원하지 않습니다.
닫기
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
해당 자료는 3페이지 까지만 미리보기를 제공합니다.
3페이지 이후부터 다운로드 후 확인할 수 있습니다.

본문내용

import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.FileWriter;
import java.rmi.*;
import java.rmi.server.*;
import java.util.*;
import javax.swing.*;
import javax.swing.text.*;
import org.xml.sax.*;
import org.w3c.dom.*;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import com.sun.org.apache.xerces.internal.dom.DocumentImpl;
import com.sun.org.apache.xerces.internal.parsers.DOMParser;
import com.sun.org.apache.xml.internal.serialize.OutputFormat;
import com.sun.org.apache.xml.internal.serialize.XMLSerializer;
import com.sun.org.apache.xpath.internal.XPathAPI;

public class RMIChatServerImplM extends UnicastRemoteObject
implements RMIChatServerM, ActionListener
{
protected Vector totalClientList; //A Vector for clients..
private Vector iDList; //중복 체크를 위한 벡터
private String clientId="", clientPw="", clientNick="", clientName="", clientAddress="", clientPhone="", clientEmail=""; //id and pw in the xml..
private RMIChatClientM client;
private int clientAge=0;
private String file, msgFile;
private JFrame f;
public static int roomCount = 0;
private JButton btnExit;
protected RMIRoomManager roomManager;

public RMIChatServerImplM(String file, String msgFile) throws RemoteException
{
super();
try{
UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
}catch(Exception e){
e.printStackTrace();
}
this.file = file;
this.msgFile = msgFile;
totalClientList = new Vector();
iDList = new Vector();
f = new JFrame();
f.setLayout(new BorderLayout());
btnExit = new JButton("서버 종료");
btnExit.addActionListener(this);
JTextPane statusWindow = new JTextPane();
StyledDocument sd = statusWindow.getStyledDocument();
Style style = StyleContext.getDefaultStyleContext().getStyle(StyleContext.DEFAULT_STYLE);
Style s = sd.addStyle("red", style);
StyleConstants.setForeground(s, Color.RED);
s = sd.addStyle("Big", s);
StyleConstants.setFontSize(s, 30);
try{
sd.insertString(sd.getLength(),"서버가 실행 중입니다..." , sd.getStyle("Big"));
}catch(Exception e){
e.printStackTrace();
}

키워드

자바,   채팅,   RMI,   XML,   프로그램,   chatting,   chat
  • 가격2,500
  • 페이지수10페이지
  • 등록일2007.10.29
  • 저작시기2006.10
  • 파일형식압축파일(zip)
  • 자료번호#433995
본 자료는 최근 2주간 다운받은 회원이 없습니다.
청소해
다운로드 장바구니