import javax.swing.*;
import java.awt.*;
import java.awt.event.*;

public class guipanel extends JPanel
{
   private static Conways con;
   private Timer t;
   private static final int DELAY = 100;
   private static boolean go;
   private static Point size = new Point(10,10); // Size of a cell
   public guipanel()
   {
      int r = 50;
      int c = 50;
      t = new Timer(DELAY, new Listener());
      con = new Conways(r,c);
      con.populate();
      setup(r,c);
      go = false;
      t.start();
   }
   private void setup(int r, int c)
   {
     
   }
   @Override
   public void paintComponent(Graphics g)
   {
      super.paintComponent(g);
      Object[][] l = con.toArray();
      int x = 0;
      int y = 0;
      for(int r = 0; r < con.numRows(); r++)
      {
         x = 0;
         for (int c = 0; c < con.numColumns(); c++)
         {
            if(l[r][c] != null) g.setColor(Color.BLACK);
            else g.setColor(Color.WHITE);
            g.fillRect(x,y,size.x,size.y);
            x+=size.x;
         }
         y+=size.y;
      }
   }
   private class Listener implements ActionListener
   {
      public void actionPerformed(ActionEvent e)
      {
         if (go) con.generation();
         repaint();
      }
   }
   public void processkeys(char c)
   {
         if (c == 'r')
         {
            go = false;
            String s = JOptionPane.showInputDialog("Read from File");
            removeAll();
            revalidate();
            repaint();
            con = null;
            con = concommon.fromFile(s);
            setup(con.numRows(),con.numColumns());
         }
         else if (c == 'w')
         {
            go = false;
            String s = JOptionPane.showInputDialog("Write to File");
            concommon.toFile(con,s);
         }
         // Add shift to change Y
         else if (c == '=') size.x++;
         else if (c == '+') size.y++;
         else if (c == '-') size.x--;
         else if (c == '_') size.y--;
         else if (c == ' ') go = !go;
   }
   public void processmouse(Point p,int b)
   {
      int mouseR = (int)(p.getY()/size.y);
      int mouseC = (int)(p.getX()/size.x);
      if (b == 1) con.set(mouseR,mouseC,new life());
      else if (b == 3) con.set(mouseR,mouseC,null);
      System.out.println(mouseR+" "+mouseC);
   }
   public void resized()
   {
   }
}
@@ -239,21 +239,25 @@
  static 
-Point
+Dimension
  size = 
@@ -260,21 +260,25 @@
 e = new 
-Point
+Dimension
 (10,10);
@@ -556,18 +556,16 @@
    %7B%0A   
-  
 %0A   %7D%0A  
@@ -990,16 +990,25 @@
 ize.
-x
+width
 ,size.
-y
+height
 );%0A 
@@ -1026,17 +1026,21 @@
 x+=size.
-x
+width
 ;%0A      
@@ -1061,17 +1061,22 @@
 y+=size.
-y
+height
 ;%0A      
@@ -1880,17 +1880,21 @@
 ') size.
-x
+width
 ++;%0A    
@@ -1922,17 +1922,22 @@
 ') size.
-y
+height
 ++;%0A    
@@ -1965,17 +1965,21 @@
 ') size.
-x
+width
 --;%0A    
@@ -2007,17 +2007,22 @@
 ') size.
-y
+height
 --;%0A    
@@ -2147,17 +2147,22 @@
 ()/size.
-y
+height
 );%0A     
@@ -2195,17 +2195,21 @@
 ()/size.
-x
+width
 );%0A     

Clarify usage of size