I have an array of seats, and the array has two strings(selected and empty). On mouse click, I want to traverse the array and find the selected seat. When I press the button
Without knowing the declaration of seatno, I'd suggest to introduce a new variable in the mouseClicked() method that is not final and does the same job as seatno currently does, as the variable seems only to be used inside that method.
By the way: Capitalize your class names (data should be Data). Will look much more clear.