i need help as i am doing a locker system for a buliding. so i have an idea to let the user to click on the different locker on one picture. Now i would like to ask for suggestion from anyone if i can like let the user click on different part of the picture to go to a different form. example like using the picture as a link. Btw i am using frame for the application's layout.
Edit: hmm, just read about the servlet. But there was never a mention of a servlet here. Probably the topic starter has an applet or application.
If you create a JLabel with an ImageIcon, you can add a MouseListener. This can trigger events like mousePressed or mouseClicked, both of which give you a MouseEvent. This MouseEvent has getX(), getY() and getPoint() methods to give you where in the label you clicked. If possible, prefer getX() and getY() to getPoint() - the latter creates a new object every time. [ November 05, 2005: Message edited by: Rob Spoor ]