|
Getting a grip on "panels": msg#00048lang.jython.user
I am working through the python with java class libraries book and stumbled upon something which does not seem intuitive to me.
On page 307 there is an example of adding radio buttons to a group. The code is as follows:
...
for a_radiobutton in radiobuttons:
group.add(a_radiobutton) #so far so good
panel.add(a_radiobutton) # this is the line that confuses me
...
I would have though that the buttons would all be added to the group and then (after the "for" loop completes) the group would be added to the panel. However, that doesn't work.
Why is it that the group can't simply be added to the panel?
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: An unsafe threading practice?, Diez B. Roggisch |
|---|---|
| Next by Date: | Re: Getting a grip on "panels", Jeff Emanuel |
| Previous by Thread: | Providing file encoding, christophe blin |
| Next by Thread: | Re: Getting a grip on "panels", Jeff Emanuel |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |