Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

simple chat Applet. kindly see the code.  RSS feed

 
nima lama
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello,
please see this code. when i run this program it produces strange result.
what is wrong with this?
it works fine for the first time. i mean when i type some thing in the text field the server response and shows it in the textarea, but i can't write it for the second time.

please make neccessary changes.
thank you.
nima lama
import java.applet.*;
import java.awt.*;
import java.awt.event.*;

****************
SERVER PROGRAM***
*****************

========================
Added the ubb code tags for easier reading- Carl
[This message has been edited by Carl Trusiak (edited June 24, 2001).]
 
Yogesh MSharma
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nima Your Code seen to be right
Just check out the progarm with the Application Insted of the Applet .if it works prob is with your Security Class
You have to check that with Secutiy One
Best if Luck
 
Rajakumar Makapur
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi nima
here problem is ur creating new socket every time when send button clicked.create socket in init method or you remove while(true){} from your processclient thread.
The code corrected i will send through mail to you.
regards
Rajakumar Makapur.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!