Hi, everyone.  This seems like it should be very easy to fix, but I am
stumped....I have 2 Labels that I put in a Panel and when I look at
the page there are 4 Labels displayed!

Here is part of the code:
<code>
public Panel getUI() {
            VerticalPanel vertPanel = new VerticalPanel();
            HorizontalPanel horizPanel = new HorizontalPanel();
            horizPanel.setHorizontalAlignment(HorizontalPanel.ALIGN_CENTER);
            horizPanel.setVerticalAlignment
(HorizontalPanel.ALIGN_MIDDLE);

            unselectedList.setVisibleItemCount(20);
            unselectedList.setWidth("250px");
            unselectedList.setHeight("300px");
            selectedList.setVisibleItemCount(20);
            selectedList.setWidth("250px");
            selectedList.setHeight("300px");

            unselectedList.addKeyboardListener(new AuditArrowKeyboardListener
(this));
            selectedList.addKeyboardListener(new AuditArrowKeyboardListener
(this));
            unselectedList.addClickListener(new ListBoxDoubleClickListener
(this, unselectedList, selectedList,
ListBoxDoubleClickListener.ID_UNSELECTED));
            selectedList.addClickListener(new ListBoxDoubleClickListener
(this, selectedList, unselectedList,
ListBoxDoubleClickListener.ID_SELECTED));

            // disable both lists and the buttons initially
            unselectedList.setEnabled(false);
            selectedList.setEnabled(false);
            arrowLeftButton.setEnabled(false);
            arrowRightButton.setEnabled(false);
            selectAllButton.setEnabled(false);
            unselectAllButton.setEnabled(false);

            VerticalPanel arrowButtonsPanel = new VerticalPanel();
            arrowButtonsPanel.setHorizontalAlignment
(VerticalPanel.ALIGN_CENTER);
            arrowButtonsPanel.setVerticalAlignment
(VerticalPanel.ALIGN_MIDDLE);
            arrowButtonsPanel.add(selectAllButton);

            HorizontalPanel lrButtonsPanel = new HorizontalPanel();
            lrButtonsPanel.setHorizontalAlignment
(HorizontalPanel.ALIGN_CENTER);
            lrButtonsPanel.setVerticalAlignment
(HorizontalPanel.ALIGN_MIDDLE);
            lrButtonsPanel.add(arrowLeftButton);
            lrButtonsPanel.add(arrowRightButton);

            arrowButtonsPanel.add(lrButtonsPanel);
            arrowButtonsPanel.add(unselectAllButton);

            VerticalPanel selectedVPanel = new VerticalPanel();
            VerticalPanel unselectedVPanel = new VerticalPanel();
            selectedVPanel.add(new Label("Selected"));
            selectedVPanel.setStyleName(LISTBOX_STYLE_NAME);
            selectedVPanel.add(selectedList);
            unselectedVPanel.add(new Label("Unselected"));
            unselectedVPanel.setStyleName(LISTBOX_STYLE_NAME);
            unselectedVPanel.add(unselectedList);
            horizPanel.add(selectedVPanel);
            horizPanel.add(arrowButtonsPanel);
            horizPanel.add(unselectedVPanel);
            horizPanel.setStyleName(LISTBOX_STYLE_NAME);

            arrowLeftButton.setStyleName(ARROW_STYLE_NAME);
            arrowRightButton.setStyleName(ARROW_STYLE_NAME);
            selectAllButton.setStyleName(ARROW_STYLE_NAME);
            unselectAllButton.setStyleName(ARROW_STYLE_NAME);

            // put the panels together
            vertPanel.add(horizPanel);
            ret.add(vertPanel);

            return ret;
        }
</code>

Here is the html it produces:

<div>
<table cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td align="left" style="vertical-align: top;">
<table class="listsArrows" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td align="center" style="vertical-align: middle;">
<table class="listsArrows" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td align="left" style="vertical-align: top;">
<div class="gwt-Label">Selected</div>
</td>
</tr>
</tbody>
</table>
</td>
<td align="center" style="vertical-align: middle;">
</td>
<td align="center" style="vertical-align: middle;">
<table class="listsArrows" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td align="left" style="vertical-align: top;">
<div class="gwt-Label">Unselected</div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<table cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td align="left" style="vertical-align: top;">
<table class="listsArrows" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td align="center" style="vertical-align: middle;">
<table class="listsArrows" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td align="left" style="vertical-align: top;">
<div class="gwt-Label">Selected</div>
</td>
</tr>
<tr>
</tr>
</tbody>
</table>
</td>
<td align="center" style="vertical-align: middle;">
</td>
<td align="center" style="vertical-align: middle;">
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>


Notice that there are 2 tables: one with just the Labels and one with
the Labels and the select boxes, etc.  Basically I can't see any
reason the first table is there.  Does anyone know how I can get rid
of it or why it is there?  (I'm using gwt-1.5.0.)

Thanks,
Josephine

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

Reply via email to