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!
matt_5104 0 Newbie Poster
jwenting 1,905 duckman Team Colleague
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.