This week's book giveaway is in the Agile forum.
We're giving away four copies of Head First Agile and have Andrew Stellman & Jennifer Greene on-line!
See this thread for details.
Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

about frames in RMI  RSS feed

 
sachin dabhade
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am facing a problem with frames in RMI.
i have used JFrame.
i have a frames which i want to display after verification of user id and password.

when i run the frame on its own,everything is fine.
but when i run client program over RMI and on verification of the user name and password,same frame is displayed but it is displayed blank.
the content of the frame is not shown.
but the same content is visible if run directly without RMI.
any clue???
thanks in advance.
sachin
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The communication by RMI should not interfere with presentation with a JFrame. Seems to me the first step in debugging would be to use good old System.out.println() to verify the the data is in fact coming back from the RMI call.
Bill
 
Michael Ernest
High Plains Drifter
Sheriff
Posts: 7292
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What kind of object are you trying to retrieve from the RMI server?
 
sachin dabhade
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have called the function from server with String return type.
i am getting a return statement from server.
and depending upon the message,i am displaying the frames.
eg :
String a = Validate(uid,pwd);//call to remote method
works finely.
if validation is successful,it returns String as "Login Successful "
i can print this on client using System.out.println.
and then on client side i do the following.
====================
if(a.equals("Login Successful")){
SwingApplication cv = new SwingApplication();
//SwingApplication.java is Post Login Screen
//It has JFrame frame;
cv.frame.setVisible(true);
f.setVisible(false);
//f is also JFrame but in Pre Login Screen
System.out.println("Cashier Logged in");
}

==========================
but the problem is that the frame is displayed using the above code but the content is not when running through RMI.i.e empty frame is displayed.

if i run SwingApplication on console with out RMI,it runs finely and displays all the content.
==========================
Hope you got the problem.
please let me know your suggestions because i am new to RMI.
thanks in advance
sachin
[ June 09, 2002: Message edited by: sachin dabhade ]
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!