Given that the only thing you can add is a widget, I suspect that you are a bit stuck. But DecoratorPanels might be a bit over the top for what you need. Have you thought of a 9-box grid where you set the bg image,(and maybe height and width) of the outside cells and the text of the centre cell? Ian
http://examples.roughian.com 2009/6/27 hezjing <[email protected]> > Hi > In > http://code.google.com/events/io/sessions/MeasureMillisecondsPerformanceTipsWebToolkit.html, > Kelly > Norton explains that we should avoid using widget if it does not receive > event. > > I look at my current code and found that I have been using labels to > display titles. > These titles are static string and do not receive event, and so I think I > should avoid using the labels. > > For example, to display a title in a rounded corner panel, I added a Label > into a DecoratorPanel: > > class RoundedTitle extends Composite { > MyClass() { > Label title = new Label("Login"); > DecoratorPanel panel = new DecoratorPanel(); > panel.add(title); > initWidget(panel); > } > } > > > May I know how should we eliminate the label in this situation, and set the > title (or string) into DecoratorPanel? > > > -- > > Hez > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
