title: How can I draw a rectangle towards the top of the application in java
body: <p>How can I draw a rectangle towards the top of the application in java ? Normally the drawRect method draws towards the bottom I tried to use a negative number but this would not work</p>
  
  <pre><code>Graphics g = p.getGraphics();
  g.fillRect(50, 200,50,100);
  </code></pre>