Hi Donald: According to http://google-web-toolkit.googlecode.com/svn/javadoc/2.0/com/google/gwt/user/client/ui/SplitLayoutPanel.html , you must attach a SplitLayoutPanel to the RootLayoutPanel, not the RootPanel. I'm guessing that you don't see the text due to the CSS positioning attributes.
Also, as that page indicates "This widget will *only* work in standards mode, which requires that the HTML page in which it is run have an explicit <!DOCTYPE> declaration." That declaration may be present, it's not clear from the post. Cheers, jec On Mon, May 24, 2010 at 10:09 AM, Donald McLean <dmclea...@gmail.com> wrote: > We're doing a technology evaluation and one of the candidate > technologies is GWT. I'm working on implementing some basic features > of our new application and so far things mostly make sense but I'm > seeing some behavior that I don't understand. > > Below I have included the relevant class file. I'm sure that it's > somewhat crude - feel free to make suggestions if you are so > motivated. :-) > > The problem is that none of the text is actually visible. Firefox says > that it's there but it can't actually be seen. I would really like to > understand why and what I need to fix. > > Thank you, > > Donald > > package edu.stsci.client; > > import com.google.gwt.user.client.Timer; > import com.google.gwt.core.client.EntryPoint; > import com.google.gwt.core.client.GWT; > import com.google.gwt.user.client.rpc.AsyncCallback; > import com.google.gwt.user.client.ui.*; > > /** > * Entry point classes define <code>onModuleLoad()</code>. > */ > public class dads implements EntryPoint > { > private static final int REFRESH_INTERVAL = 5000; // ms > > /** > * Create a remote service proxy to talk to the server-side Status > service. > */ > private final StatusServiceAsync statusService = > GWT.create(StatusService.class); > > final Label upLabel = new Label(); > final Label downLabel = new Label(); > > /** > * This is the entry point method. > */ > public void onModuleLoad() > { > SplitLayoutPanel p = new SplitLayoutPanel(); > > FlexTable nav = new FlexTable(); > > nav.setText(0,0, "DADS Status"); > nav.getFlexCellFormatter().setColSpan(0,0,2); > > nav.setText(1, 0, "Up:"); > nav.setWidget(1, 1, upLabel); > nav.setText(2, 0, "Down:"); > nav.setWidget(2, 1, downLabel); > > p.addWest(nav, 128); > > HTML header = new HTML("<h1>DADS Web Operator Interface</ > h1>"); > p.addNorth(header, 40); > > HTML body = new HTML("details"); > p.add(body); > > RootPanel.get().add(p); > > setupUpdateTimer(); > } > > private void setupUpdateTimer() > { > // Setup timer to refresh list automatically. > Timer refreshTimer = new Timer() > { > @Override > public void run() > { > refreshServerStatus(); > } > }; > refreshTimer.scheduleRepeating(REFRESH_INTERVAL); > } > > private void refreshServerStatus() > { > statusService.statusServer("server", new UpdateLabels()); > } > > class UpdateLabels > implements AsyncCallback<String> > { > public void onFailure(Throwable caught) > { > System.out.println("[dads.onFailure] enter."); > upLabel.setText("not available"); > downLabel.setText("not available"); > } > > public void onSuccess(String result) > { > System.out.println("[dads.onSuccess] result: " + result); > String[] strings = result.split(","); > upLabel.setText(strings[0]); > downLabel.setText(strings[1]); > } > } > } > > -- > 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-tool...@googlegroups.com. > To unsubscribe from this group, send email to > google-web-toolkit+unsubscr...@googlegroups.com<google-web-toolkit%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/google-web-toolkit?hl=en. > > -- 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-tool...@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.