A bit of confusion with passing variables/infinite loop
Hi all, I'm having a bit of a problem here...
I'm making a simple MS Paint style program which allows the user to draw different shapes on a panel and edit the line thickness/width and the shape they'd like to draw using controls on a frame.
I have my 3 classes, my frame(which includes my main method and user input buttons), my panel(for drawing on) and a class which holds all the variables of the shapes etc (I know this could probably go into the frame class, but I'll do that later)
Anyway, the problem I'm having is that my frame class calls my panel in order to create a space to draw on, my panel calls the variables from my line variable class and my line variable class calls variables from my frame class (due to the user input on the frame). Then of course, the frame class calls the panel class again etc etc etc.
Any ideas of how I can get out of this?
Thanks!