import java.awt.*; class DrawSpins extends java.awt.Canvas{ // Responsible for painting spin config to screen private int space, circle, iborder, jborder; private Ising appletref; private int L; // By passing in reference to control applet can 'go between' different // objects public variables and methods // Constructor for DrawSpins DrawSpins(Ising ref){ appletref=ref; space=ref.spin_spacing; circle=ref.circle_size; this.iborder=ref.iborder; this.jborder=ref.jborder; this.L=ref.L; setBackground(Color.white);} public void paint(Graphics g){ int i,j; // Paint spins red or black circles according to spin direction. for(i=0;i