| Author |
How to determine the JWindow location ?
|
Edward Chen
Ranch Hand
Joined: Dec 23, 2003
Posts: 758
|
|
How to determine the JWindow location ? I have JApplet, which contain a Canvas in BorderLayout.center. The canvas has mouse events. When I click a Point in the canvas, it will pop up a JWindow below&left that Point. The problem is how to determine the location the JWindow show up ? I try setLocationRelativeTo(), it doesn't work. Any help is welcome. Thanks
|
 |
Gregg Bolinger
Ranch Hand
Joined: Jul 11, 2001
Posts: 15230
|
|
I'm confused. You said how to determine where it will show up? To me that means you want to know the coordinates of the JWindow when it displays. On the other hand, you might mean that you want to control where the JWindow pops up meaning you want to specifcy the location instead of having it show at the point explained. Can you clear this up?
|
 |
Edward Chen
Ranch Hand
Joined: Dec 23, 2003
Posts: 758
|
|
Originally posted by Gregg Bolinger: you might mean that you want to control where the JWindow pops up meaning you want to specifcy the location instead of having it show at the point explained.
This is what I mean. I am doing an interactive map. When mouse over a city in the map, a JWindow will pop up , its left&top point should be mouse clicking point. Thanks
|
 |
 |
|
|
subject: How to determine the JWindow location ?
|
|
|