Re: Java Drawing App
Got it - never mind
Volker Held wrote:
> i´m having trouble with the final stages of listening to my drawing
> actions in a rather simple application.
> I have a DrawApp.class that extends JFrame handling the menu bar an the
> general appearance.
> Second is a custom ActionAdapter.class implementing ActionListener that
> handles all the menu actions .
> Third is a DrawPane.class extending JPanel this class should listen to
> mouse clicks and releases to draw simple forms. Now the problem is i
> need to let the DrawPane class know what menu items were selected /
> clicked or vice versa the custom ActionAdapter needs to tell my DrawPane
> .class what color was selected.
> I thought of instantiating DrawPane in DrawApp ( replacing the content
> pane with the instance of DrawPane ), but if i do, how do i call
> DrawPane´s methods to change it´s class members according to the menu
> selections ( which are handles by the custom ActionAdapter... )
> Pretty confusing i know...
> I´d be happy for any suggestions you might have ( note: i don´t want to
> use static functions and member variables for DrawApp... if you know a
> way around, pls tell me )
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center