Re: drawing tower of hanoi

Joseph Mack NA3T <[email protected]> Sat, 18 Jun 2011 07:46:22 -0700 (PDT)
Newsgroups gmane.org.user-groups.trijug.juglist
Message-ID <[email protected]>
On Sat, 18 Jun 2011, Joseph Mack NA3T wrote:


I've now got frame.repaint() in the move_disks() method so 
its called after a disk move.

Next thing is to get the state of the Tower into 
DrawRectangles. I don't know how to do this. If I pass Tower 
myTower as a parameter to one of the DrawRectangle methods, 
the compiler complains that myTower is not known.

> Is the mouse clicks events the model I should use?

the code which detects mouseevents just redraws the button. 
It's not obvious how to use this in my case

THanks Joe

-- 
Joseph Mack NA3T EME(B,D), FM05lw North Carolina
jmack (at) wm7d (dot) net - azimuthal equidistant map
generator at http://www.wm7d.net/azproj.shtml
Homepage http://www.austintek.com/ It's GNU/Linux!