wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes getLocationOnScreen of CellRect Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "getLocationOnScreen of CellRect" Watch "getLocationOnScreen of CellRect" New topic

getLocationOnScreen of CellRect

Isaac Hewitt
Ranch Hand

Joined: Jul 24, 2006
Posts: 190

I am using drag and drop. The user initiates a drag on a table cell. The size of the table cell is determined along with the text in that cell. A label is created which can be dragged across the glasspane.
The part that is not working correctly is the location on screen. The label when it appears on the glasspane appears very far to the left offscreen and obove the slected table cell. The purpose of this is for visual effect whilst dragging a film title to a text box. Here > frame.getGlasspane().setPoint(this.getLocationOnScreen(selected_Row));

It is sorta covered in the JavaRanch Style Guide.
subject: getLocationOnScreen of CellRect
Similar Threads
Drag and Drop problem
Extracting Pixel Data From Fonts
Making a buffered image of a JTable row
Zoom Action
how to convert a bufferedImage into a string