• 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

sockets in applet

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
wrote a program for socket communication in applet
but the connection cannot be established .
there is no response from the applet.
found no problem in application programming.

anyone can tell me why this happens.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is the applet initialized properly? Are there any messages in the Java Console?

Also be aware that applets can normally only connect to the host where they are served from, not any other host. There are workarounds, though.
 
RAGUNATH RAVICHANDRAN
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Ulf Dittmer:
Is the applet initialized properly? Are there any messages in the Java Console?

Also be aware that applets can normally only connect to the host where they are served from, not any other host. There are workarounds, though.



yaeh i established socket connection inside applet.
but when i used any text boxes in side the applet its not working.
i have attached two programs just rectify it.
.........................
client program
..............

in the above program i send an declared message from client to server.
i have to send it from client text box to server's text box.
can u please help me
[ April 06, 2006: Message edited by: Ulf Dittmer ]
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

its not working


What does this mean? What does and does not happen according to your expectations? Tell The Details.


catch (Exception E)
{
}


This is a bad idea. How are you going to know if there are any errrors that prevent the applet from working?
[ April 06, 2006: Message edited by: Ulf Dittmer ]
 
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think you should add in your paint method. That way your contentPane will be painted and your textBoxes can be painted.
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Also, in Swing, you should generally override paintComponent, and not paint, like you would do in AWT.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic