title: Dont know how to call paint method
body: <p>Hi i want to know how to call the paint method...</p>
  
  <p>I am a novice programmer and am really just experimenting with things like paint.</p>
  
  <p>The program i am trying to make is the game where there are 3 rungs and the aim of the game is to move different sized disks from the left/right rung to the right/left rung.</p>
  
  <p>here is my code(no where near finished give me a break):</p>
  
  <pre><code>public static void main(String[] args) {
      Scanner scan = new Scanner(System.in);
      int amount = 0;
  
      // get the amount of rectangles to draw to represent disks
      while (amount &lt;= 1 &amp;&amp; amount &gt;= 5) {
          System.out.print("Please enter amount of discs to use(less than 7 more than one).");
          amount = scan.nextInt();            
      }
  }
  
  public void paint(Graphics g) {
      // draw a certain amount of rectangles in ascending order
      if (amount &lt;= 1 &amp;&amp; amount &gt;= 5) {
          for (int i = 0; i &lt; amount; i++) {
              g.fillRect(220 - (20 * i), 200 + (10 * i), 100 - (20 * i), 20);
          }
      }
  }
  </code></pre>