title: Simplest way to display a window with dots on it
body: <p>I have spent the last hour perusing the internet on how exactly to create a super simple display in my program. Here is the situation:</p>
  
  <p>1.) I have a for loop that runs an arbitrary number of times. Each iteration, it spawns a "city", that is, a randomly generated x coordinate and y coordinate (both ints). </p>
  
  <p>2.) I want to create the SIMPLEST display possible. Nothing fancy. That is, ideally, a window, sized 600x600, that draws a single black dot for each city for each iteration of this for loop.</p>
  
  <p>Here is what I have so far:</p>
  
  <pre><code>    f.setPreferredSize(new Dimension(600, 600));
      f.pack();
      f.setVisible(true);
      f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  
      for (int i = 0; i &lt;= nodeArray.length-1; i++)
      {
          nodeArray[i] = new Node();
          nodeArray[i].x = 0 + (600 - 0) * r.nextDouble();
          nodeArray[i].y = 0 + (600 - 0) * r.nextDouble();
  
          //DRAW DOT HERE?
      }
  </code></pre>
  
  <p>For each iteration of this for-loop, I want to draw, in this window, a black dot with x coordinate (int)nodeArray[i].x and y coordinate (int)nodeArray[i].y</p>
  
  <p>I REALLY appreciate any help. This is a somewhat high-level algorithms course, and I'm kind of embarrassed I can't seem to figure out how graphics actually work in Java...</p>