• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

simple chat Applet. kindly see the code.

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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).]
 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
The government thinks you are too stupid to make your own lightbulb choices. But this tiny ad thinks you are smart:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic