Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Urgent help needed in this code..it involves threads!

 
Komal Arora
Ranch Hand
Posts: 91
Eclipse IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

OK! So this is a parking lot application i have created. pasting the enter GUI code would be a waste and therefore i am pasting only that part of code in which i am getting a problem.
Right, So i have two threads running, one to remove a car from the parking lot and one to park a car in the parking lot. The code is running just fine and i get the output at the console as well. Now i have used a swing GUI which has a jtextField for every parking space. What i want is that the textfield for the corresponding parking space sets its text to "Car parked" automatically. For that i have a
AutoCarParkedEditor which is shown in bold in the Park() method. However, The text in not getting set in the text boxes even though i am getting everything on the console. I know this is some thread issue because the GUI has a thread and i have created two threads as well. Can anybody tell me how to resolve this problem so the AutoCarParkedEditor method works? i need a solution urgently so any help would be great. thanks

 
Rob Spoor
Sheriff
Pie
Posts: 20550
57
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please EaseUp. There is no such thing as urgent around here. Also, please UseAMeaningfulSubjectLine.

Have you read and understood Concurrency in Swing?
 
Komal Arora
Ranch Hand
Posts: 91
Eclipse IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rob Spoor wrote:Please EaseUp. There is no such thing as urgent around here. Also, please UseAMeaningfulSubjectLine.

Have you read and understood Concurrency in Swing?


OK. Sorry for writing like that. Actually i had to submit the assigment on that day itself and i had just one day to code!
Anyways, the problem has been solved. I studied concurrency in swing properly and i solved the problem.

Will use meaningful subject lines from now onwards.

 
Jayesh A Lalwani
Rancher
Posts: 2756
32
Eclipse IDE Spring Tomcat Server
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wasn't there a parking lot problem posted here few days ago? SOunds like multiple people from your class post here

ETA: BAH!!! the thread was started by yourself !!!. SOmeone even posted a solution, but you never showed up in the thread. The least you can do before posting a "urgent" question is go through your own posts
 
Komal Arora
Ranch Hand
Posts: 91
Eclipse IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes i started that topic and with reference to the solutions given there only i coded. I got a problem in the code and thus asked.
i guess i should have posted this code in that thread only. I've never got such responses in a topic
anyways, will keep in mind all these things when i post next time.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic