-
Re: Java Drawing App
Got it - never mind 
Volker Held wrote:
> Hi,
>
> 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 )
>
> Volker
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks