I've a Dialog with several component.
This screen has a page next / page previous menu.
Each time I change from a page to another, I delete all components within
dialog and re add some components.
I run into an ArrayOutOfBoundException when the store hightlighted
component is upper than the actual number of components.
I made the following updates in Dialog.java in order to reset the
highlightcomponent number.
public void delete (Component component)
{
delete(components.indexOf(component));
}
public void delete (int index)
{
clearLayout();
if(highlightedComponent >= index)
highlightedComponent = -1;
components.removeElementAt( index );
}
public void deleteAll ()
{
clearLayout();
highlightedComponent = -1;
components.removeAllElements();
}
once I fixed this, I run into another problem : the top of screen is
truncated.
I fixed it by resetting the TopOfScreen value into the Dialog.clearLayout()
method :
private synchronized void clearLayout ()
{
componentWidths = null;
absoluteHeights = null;
// reset the top of Screen used for scrolling
topOfScreen = 0;
}
Original issue reported on code.google.com by jmherme...@gmail.com on 7 Jan 2008 at 2:34
Original issue reported on code.google.com by
jmherme...@gmail.com
on 7 Jan 2008 at 2:34