• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Need help in GUI

 
Ranch Hand
Posts: 361
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 288
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Evildoers! Eat my justice! And this tiny ad's justice too!
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic