title: Rectangle thickness java
body: <p>I need to outline in blue 1 rectangle at a time when selected. The code works but I cant see the blue outline very well. what is the easiest way to make the outline thicker. Wither that be drawing another shape over it or something else.</p>
  
  <pre><code>private void displayBlock(Graphics g)
  {
      for(int i = 0; i &lt; 10; i++)
      {
  
          if (occupant[i].equals("Empty"))
          {
              //Sets the rectangle red to show the room is occupied
              g.setColor(emptyColor);
              g.fillRect(150+(i*50), 120, aptWidth, aptHeight);
  
          }
          else
          {
              //Sets the rectangle green to show the room is free
              g.setColor(Color.red);
              g.fillRect(150+(i*50), 120, aptWidth, aptHeight);               
          }
          if (i == selectedApartment)
          {
  
              g.setColor(Color.blue);
              g.drawRect(150+(i*50), 120, aptWidth, aptHeight);
  
          }
          else
          {
              g.setColor(Color.black);
              g.drawRect(150+(i*50), 120, aptWidth, aptHeight);
          }
  
          // Draws the numbers in the Corresponding boxes
          g.setColor(Color.black);
          g.drawString(Integer.toString(i+1), 150+(i*50)+15, 120+25);
      }
  
      //Drawing the key allowing the user to see what the colours refer to
      g.setFont(new Font("TimesRoman", Font.PLAIN, 14));
      g.drawString("Key", 20,120);
      g.drawString("Occupied",60,150);
      g.drawString("Empty", 60, 170);
  
      // Drawing the boxes to show what the colours mean in the key             
      g.setColor(Color.red);
      g.fillRect(20, 130, 25, 25);
      g.setColor(Color.black);
      g.drawRect(20, 130, 25, 25);
      g.setColor(Color.green);
      g.fillRect(20,150,25,25);
      g.setColor(Color.black);
      g.drawRect(20,150,25,25);
  
  } // End of displayBlock
  </code></pre>