That's it, thanks Paul! I guess using this.button = new MyButton();
makes button a property of MyDiv so I can then use button's methods
from this class - this.button.addClickListener et.c. Is this
conceptually correct? I'm still learning OOP as you can tell! ;-)

Much obliged,
Alanj

On Wed, Apr 1, 2009 at 10:44 AM, Paul Robinson <ukcue...@gmail.com> wrote:
>
> public class MyDiv extends FlowPanel {
>        private MyButton button;
>
>        public MyDiv(){
>                setStyle();
>                this.button = new MyButton();
>                this.add(button);
>        }
>
>        public MyDiv(String html) {
>                setStyle();
>                this.button = new MyButton(html);
>                this.add(button);
>        }
>
>        public void addClickListener(ClickListener listener) {
>                this.button.addClickListener(listener);
>        }
> }
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to