Hello
I created an ULCBoxPane with 400 ULCTextFields.
When I setNextFocusableComponent() on each TextField, I get a
StackOverflowError.
If I use less TextFields or don't set the nextFocusableComponent,
everything is ok.
Please see the example below.
Thanks for any help.
Regards
Stefan
/**
* TestApplication for many TextFields with tabbing-order
*/
public class ManyFieldsApplication extends AbstractApplication {
public void start() {
ULCFrame frame = new ULCFrame("Test");
frame.setDefaultCloseOperation(ULCFrame.TERMINATE_ON_CLOSE);
frame.setSize(new Dimension(400, 300));
frame.add(new ULCScrollPane(createPane()));
frame.setVisible(true);
}
private ULCComponent createPane() {
// use less numberOfFields and it will be ok
int numberOfFields = 400;
ULCBoxPane pane = new ULCBoxPane(true);
ULCTextField previous = null;
for (int i = 1; i <= numberOfFields; i++) {
ULCTextField text = new ULCTextField(String.valueOf(i),
20);
pane.add(IDefaults.BOX_LEFT_TOP, text);
if (previous != null) {
// comment the next line, and it will be ok
previous.setNextFocusableComponent(text);
}
previous = text;
}
return pane;
}
public static void main(String[] args) {
DevelopmentRunner.setApplicationClass(ManyFieldsApplication.class);
DevelopmentRunner.main(args);
}
--
mailto:[EMAIL PROTECTED] / http://www.dvbern.ch
Nussbaumstrasse 21, Postfach 106, CH-3000 Bern 22
Telefon: ++41 +31 378 24 24 / Telefax: ++41 +31 378 24 74
_______________________________________________
ULC-developer mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/ulc-developer