manuipulating JPEGs in an GUI
Hi, I'm creating a GUI in which users are required to interact with graphs. I have a jFrame on which I have put a jLabel and used this label to import a JPEG of a graph (i.e it's an icon). My problem is that the user needs to pick a point on the graph, and from that two coordinates will be obtained. These coordinates obviously need to corespond with the axes on the graph. How can I convert the pixel coordinates of the jLabel that the mouseClicked event will give me into coordinates that correspond to the JPEG graph? Any help is great appreciated!
Implement the mousemoverlistener interface for the container that contains the component that you want to track the mouse position from. The mouse event has a method, getPoint(), you shold use that.
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center