Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Quick Question on updation  RSS feed

 
ghazanfar khan
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Everyone,
I am developing client side application, i am using JInternalFrame. In this i have option name as Query in which it shows the current status of data like at what state is my data right now.

I have question let us suppose client 1 is log in and Client 2 in log in
Client one view the Query Frame (Data status is right now is 1) but at the same time Client 2 change the status of that data from 1 to 2.

So how is that possible that my client 1 can see that updation mean then it data stae changes from 1 to 2 without kill that frame.

thanks in advance
looking forward
 
Marcus Hathaway
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ghazanfar,

I'm quite new to java myself so you may like to wait for other responses...however i achieved a similar thing using threads. Have a thread run through your program that updates the query. Then the various clients can see data changes as they happen rather than having to exit and restart...

In my program, the class implements runnable. I then have seperate methods for updating the query. Sorry if this reply is a bit sketchy....but it may spark an idea of how to get your own program working! Good luck!
 
ghazanfar khan
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply Marcus ,
In my case i create new thread in my main program, like someone start that application by clicking jar file at that time i instantiate new thread for that client but rest. So can you please give me some suggestion because i almost done with my application and it is reay to launch but this happened becasue this is my first application so please give me some advise thanks in advance
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!