Example usage for javax.swing JLabel getLocation

List of usage examples for javax.swing JLabel getLocation

Introduction

In this page you can find the example usage for javax.swing JLabel getLocation.

Prototype

public Point getLocation() 

Source Link

Document

Gets the location of this component in the form of a point specifying the component's top-left corner.

Usage

From source file:Main.java

@Override
public void mousePressed(MouseEvent e) {
    JLabel label = (JLabel) e.getSource();
    initLabelLocation = label.getLocation();
    initMouseLocationOnScreen = e.getLocationOnScreen();
}