Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Server Socket window hanging while calling from JFrame window

 
ahmedali mohd
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I m opening Server Socket chat window from my JFrame using mouse click operation. It is getting hang in the sense it is connecting to client but actually it is not display anything on the screen, Totally blur / white window with only title window but behind the screen, Client able to send mssg to server but server couldn't becoz of blur. Without calling through JFrame, both Client and server are working fine ...

Code for Server Socket which making my frame and server chat window itself becoming hang... Why i don't know, please let me
I tried painting using repaint() but still not coming properly.
if(me.getClickCount() == 1 )
{
// Server2 myobj=new Server2(); // This is fine ...
// myobj.myServer(); //When i calling this method, it is hanging.. This method contains the following code as follows
}

/// myServer() code

try {
server=new ServerSocket(12345,100);
while( true )
{
try {
System.out.println("yes");
System.out.println(" Before waiting connection");
mywaitConnection();
System.out.println(" After connecting to client and before stream data");
getMyStreamData();
System.out.println(" After stream data but before process connections");
processMyConnection();

}
catch(EOFException ef)
{ System.err.println("error"+ef); }

 
Rob Spoor
Sheriff
Posts: 20822
68
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please UseCodeTags.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!