Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need help in GUI

 
Khaled Mahmoud
Ranch Hand
Posts: 361
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
In my data frame of the assignment, when the user wants to book a record,
he has to select that record from the JTable first.When the record is booked,
i want the user to be not able to select another row in the JTable while still
can update the data of the selected row.

Please help.
Regards,
Khaled Mahmoud
 
Mark Smyth
Ranch Hand
Posts: 288
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Khaled Mahmoud:
Hello,
In my data frame of the assignment, when the user wants to book a record,
he has to select that record from the JTable first.When the record is booked,
i want the user to be not able to select another row in the JTable while still
can update the data of the selected row.

Please help.
Regards,
Khaled Mahmoud


I think this is what you want to do:

 
Khaled Mahmoud
Ranch Hand
Posts: 361
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have solved the problem by adding a ListSelectionListener to the selection model of the JTable.And whenever the frame is in the booked mode,the event handling code will always select row at the JTable that contains the booked record.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic