Drawing sets of boxes to display contents of arrays
Multiplies can be pretty expensive within loops, so I minimized the use of them by precalculating where possible. It is also better to have the Y loop before the X loop to prevent cache misses (which wouldn't matter on a really small array like this but is a good practice). Consider this alternative:

for(int y = 0; y &lt; 3; y++)
{
  final int yy = y * size;

  for(int x = 0; x &lt; 3; x++)
  {
    final int xx = x * size;

    if(pattern[x][y] == 1)
    {
      g.setColor(colorrange.colb());
      g.fillRect(actlo + xx, actlo + yy, size, size);
    }

    g.setColor(Color.yellow);
    g.drawRect(actlo + xx, actlo + yy, size, size);

    if(patternb[x][y] == 1)
    {
      g.setColor(colorrange.colb());
      g.fillRect(actlo + xx, inlo + yy, size, size);
    }

    g.setColor(Color.yellow);
    g.drawRect(actlo + xx, inlo + yy, size, size);
  }
}