0

I know how to easily get the coordinates of a jPanel that you make in a program, but I am really trying to figure out how to get the coordinates of a window that isn't jPanel + jFrame; such as a window in Chrome or even just a directory (not swing).

Usually, I can find something online, but this seems to be a feature that perhaps Java cannot perform. I am looking for some higher knowledge about this.

Gary
  • 13,303
  • 18
  • 49
  • 71
dylnmc
  • 3,810
  • 4
  • 26
  • 42
  • Then either you didn't search hard enough or in the right direction, for [example](http://stackoverflow.com/questions/6091531/how-to-get-the-x-and-y-of-a-program-window-in-java) – MadProgrammer Jun 27 '14 at 00:57
  • Ha! Thanks I had a feeling that would happen. I really did search for a while for this and may not have been using the correct key words. – dylnmc Jun 27 '14 at 01:38
  • Perhaps you should try using a slightly nicer approach to responding to people's inquiries as well. – dylnmc Jun 27 '14 at 01:38
  • No worries, I appreciate it can be a little hard when you have no point to start from ;) – MadProgrammer Jun 27 '14 at 01:38
  • Also, I was looking for a little more Java and a little less import... I don't know why but I really like creating things myself. I know that it sounds particularly stupid - especially from a programmer - but I really like making things myself. Perhaps that is why I am so fond of assembly...Thank you for the site, though. – dylnmc Jun 27 '14 at 01:45
  • Also, sorry to keep commenting, but I downloaded and imported the .jar files and .zip files from github, but it doesn't work and I'm assuming it is because I am using a Mac; I think I read that JNA doesn't work for Mac (at least that's true for bringing a window to focus with JNA). Any thoughts? – dylnmc Jun 27 '14 at 02:13
  • You might need to have a look at [this](https://jna.java.net/javadoc/overview-summary.html), but yes, JNA supports Mac OS – MadProgrammer Jun 27 '14 at 02:26
  • You could also have a look at [this](http://stackoverflow.com/questions/12057817/using-jna-to-get-nswindow-from-jcomponent-on-mac) – MadProgrammer Jun 27 '14 at 02:34

0 Answers0