Seems simple enough:
“To use a Viewport, just create one and set the component that goes inside it using the setViewedComponent() method. When the child component changes size, the Viewport will adjust its scrollbars accordingly.”
So, I started with an existing component (slComp) that appears as a window when the user clicks a button. The user can add items to that component and increase the vertical size. That worked and now I need a vertical scrollbar, but I must not be using Viewport correctly.
slComp = new SpeakerLayoutComponent(); // a custom component with rows of text boxes for specifying a speaker layout
slView = new Viewport();
then when a button is clicked:
// i used these lines before i needed a Viewport and it worked fine
Nothing shows now. There must be another way to show the viewport. What am I missing or doing wrong?