Lesson 10 - Handling Click on Coordinates in Java Swing
In the previous lesson, Drawing on Graphics in Java Swing, we started programming an application
managing the seat occupancy in a cinema. We used
Graphics as a
canvas to draw on. In today's Java tutorial, we're going to finish the app.
Changing the Seat Status
Let's program it so that when we click on a particular seat, this seat will be marked available/booked.
Auditorium class, we'll need a method to change the seat
...End of the preview...
You've come here and that's great! We believe that the first lessons showed you something new and useful
Do you want to continue the course? Go to the premium section.
- Unlimited and permanent access to individual lessons.
- High quality IT knowledge.
- Skills to help you get your dream and well-paid job.
Requested article covers this content:
In this tutorial, we'll learn to handle clicking on certain coordinates in JPanel and highlight the seat accordingly. We're programming a Swing cinema app.
You gain points by supporting our network. This is done by sending a helpful amount of money to support the site, or by creating content for the network.