Hi Dan,
Do you mean display the device coords of the mouse position ?
If you're using JMapPane you can draw text, or anything else, on it
but you'll need to sub-class it and override its paintComponent method
to do that reliably. So, in your case you might draw a filled
rectangle over the map to provide a background for your text...
MyMapPane extends JMapPane {
@Override
protected paintComponent(Graphics g) {
// draw map
super.paintComponent(g);
// draw your rectangle
...
}
Then you can write the mouse coords onto that rectangle via a mouse
listener method.
There is also the org.geotools.swing.StatusBar widget that will
display the mouse position in world coords. You could hack that to
also display the device coordinates.
Not sure if I've answered your question.
Michael
------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing.
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users