title: Java position of the mouse on the screen
body: <p>I am making this GUI where you have icons that should always stay at the same position on the screen and I want to make them do something once I click on them.</p>
  
  <p>In my case I've made this neat cancel symbol which I placed on the upper right corner of my lwjgl display - I've made this code here to enable clicking on it:</p>
  
  <pre><code>private void CloseIcon()
  {
      if(Input.GetMousePosition().GetX() &gt; 1175 &amp;&amp; Input.GetMousePosition().GetX() &lt; 1215 &amp;&amp;
         Input.GetMousePosition().GetY() &gt; 685 &amp;&amp; Input.GetMousePosition().GetY() &lt; 715)
      {
          if(Input.GetMouse(0)) {
          System.out.println("closing porgram..");
          }
      }
  }
  </code></pre>
  
  <p>Now there are two issues with this method and I was wondering If there's a better way to do it?</p>
  
  <p>Issue 1: When I change the resolution of my display, or if I go to full screen, obviously the definition for x and y aren't the same anymore - what's a better way to define the location of the icon?</p>
  
  <p>Issue 2: At the moment I have the icon object move together with the camera, like that it always stays at the same place on the screen - still is there a better way to position the object in openGL so it stays always at the same place no matter what the camera is doing?</p>