That does the trick. Thanks Greg for the quick response.
Yunlong ________________________________ From: Greg Brown [mailto:[email protected]] Sent: Friday, August 06, 2010 12:40 PM To: [email protected] Subject: Re: Add a component to ScrollPane in Java A scroll pane doesn't know what to do with arbitrary components added to it via add(). You need to tell the scroll pane specifically what to do with your component. For example, try calling: serverTreeScrollPane.setView(l2); Greg On Aug 6, 2010, at 2:35 PM, Yunlong Zhao wrote: Hi All, I am very new to Pivot and just starting to play with it. I have a ScrollPane declared in the wtkx file as the following: <ScrollPane wtkx:id="serverTreeScrollPane" verticalScrollBarPolicy="fill_to_capacity"styles="{backgroundColor:'#E8E 8E8'}"> </ScrollPane> And have the following code in Java to add a link button to the scrollpane: LinkButton l2 = new LinkButton("Test"); serverTreeScrollPane.add(l2); When I run the code, nothing shows in the scrollpane. For BoxPane (<BoxPane wtkx:id="serverTreeScrollPane" orientation="vertical">), the button was added just fine. What did I do wrong? Thanks, Yunlong
