New to Java Need help with Basic Graphic program
Posted on 2006-03-19
I am starting to write a Basic Graphic program for a College JAVA course that will draw simple shapes (Oval and Rectangle) when the respective button is pushed. Now I already have the design set up with the buttons I need. These include the two mentioned earlier and a "Center" button as well as a "Corner" button. These will either draw the shape (which ever is selected) in the Center or all 4 corners of the Display Panel. I also already have three classes which are: DisplayPanel, ButtonPanel, and ButtonInterfaceApplication.
My question is this: How do I get DisplayPanel class to correctly display the shapes and layout? Meaning I click the button which registers in the ButtonPanel class and the DisplayPanel class will read the information from that class and do what is necessary.
I know that I should use Boolean expressions for the 4 buttons. But I am confused on tieing it all together. Mainly method calling and the interface aspect. I already know how to draw the shapes with the Graphics g thing.
Thanks for any help at all.