Jump to content
  • Advertisement


  • Content count

  • Joined

  • Last visited

Community Reputation

126 Neutral

About phaelax

  • Rank
  1. phaelax

    Finding Coordinates in a JFrame

    This might help you: public void mouseClicked(MouseEvent e) { PointerInfo a = MouseInfo.getPointerInfo(); Point point = new Point(a.getLocation()); SwingUtilities.convertPointFromScreen(point, e.getComponent()); x=(int) point.getX(); y=(int) point.getY();}
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!