Java Point.getLocation()

Syntax

Point.getLocation() has the following syntax.

public Point getLocation()

Example

In the following code shows how to use Point.getLocation() method.


import java.awt.Point;
/*from ww  w.  jav  a2  s  . c o  m*/

public class Main {
  public static void main(String[] args) {
    Point p = new Point();
    
    p.setLocation(2.3D,3.3D);
    System.out.println(p.getLocation());
  }
}




















Home »
  Java Tutorial »
    java.awt »




BasicStroke
BorderLayout
CardLayout
Color
Cursor
Desktop
DesktopManager
DisplayMode
EventQueue
FlowLayout
FocusTraversalPolicy
Font
FontMetrics
GradientPaint
Graphics
Graphics2D
GraphicsConfiguration
GraphicsDevice
GraphicsEnvironment
GridBagConstraints
GridBagLayout
GridLayout
Image
ItemSelectable
KeyboardFocusManager
LayoutManager
LayoutManager2
Point
Rectangle
Robot
Shape
SplashScreen
SystemColor
SystemTray
TexturePaint
TrayIcon
Toolkit
Transparency