Yes, what my fellow poster said was right
U'd have to send a http request to the servlet from your swing component and get reponse back.
make use of java.net.URL & java.net.URLConnection pacakage to acheive this.
You can checkout an Applet implementation mentioned down below
The Example APPLET code:
http://mindy.cs.bham.ac.uk/AppletServletExample/EgApplet.java.txt
The Example SERVLET code:
http://mindy.cs.bham.ac.uk/AppletServletExample/EgServlet.java.txt
and the Example AppletDemo Class
http://mindy.cs.bham.ac.uk/AppletServletExample/EgApplet.class
just for further reference make use of the link below.
http://www.theserverside.com/discussions/thread.tss?thread_id=33975
http://www.javamaterial.com/Javanetworking.html
http://jan.netcomp.monash.edu.au/distjava/http/lecture2.html
REGARDS,
RaHuL