SwingUtilities: convertPointFromScreen(Point p, Component c) : SwingUtilities « javax.swing « Java by API






SwingUtilities: convertPointFromScreen(Point p, Component c)

  

    
import java.awt.Point;

import javax.swing.JButton;
import javax.swing.SwingUtilities;

public class Main {
  public static void main(String[] argv) {
    JButton component = new JButton();
    Point pt = new Point(component.getLocation());

    SwingUtilities.convertPointFromScreen(pt, component);
  }
}

   
    
  








Related examples in the same category

1.SwingUtilities: convertPointToScreen(Point p, Component c)
2.SwingUtilities: getRoot(Component c)
3.SwingUtilities: getWindowAncestor(Component c)
4.SwingUtilities.invokeLater(Runnable doRun)
5.SwingUtilities.isEventDispatchThread()
6.SwingUtilities.isLeftMouseButton(MouseEvent mouseEvent)
7.SwingUtilities.isMiddleMouseButton(MouseEvent mouseEvent)
8.SwingUtilities.isRightMouseButton(MouseEvent mouseEvent)
9.SwingUtilities: invokeAndWait(Runnable run)
10.SwingUtilities: updateComponentTreeUI(Component c)