Hi frds, i'm using client and Server communication using Sockets by using Swings,how can i call a method using thread which hve to run till da prgm exit.
The method inludes reading of data stream continusly whn ever send button is clicked.i'm using NetBeans. Pgm is.... package networking;
class Ser extends javax.swing.JFrame implements Runnable
public class Server
public static void main(String args)
Ser ob=new Ser();
Thread th=new Thread(ob);
Joined: Jan 09, 2009
plzzz rply frds....
Joined: Jun 09, 2003
as this is your stated problem
> how can i call a method using thread which hve to run till da prgm exit.
forget your program for the moment, and just write a sample program,
jframe with a Jbutton and actionlistener to do your thread stuff (can be just a System.out.println)
have a go, and if you can't work it out, after visiting the thread tutorials and/or googling "new Thread",
post your sample program here, so we can help you work it out. Then you should be able to adapt the
same principles to your main program.
when posting code - use the code button (paste your code between the tags)