Hi Stefan, Thanks for pointing out the problem.
I could reproduce your problem but for a number > 400. I have created an issue: http://www.canoo.com/jira/browse/UBA-7268 The work around is to upload the textfield as soon as you create it: for (int i = 1; i <= numberOfFields; i++) { ULCTextField text = new ULCTextField(String.valueOf(i), 20); text.upload(); pane.add(IDefaults.BOX_LEFT_TOP, text); if (previous != null) { // comment the next line, and it will be ok previous.setNextFocusableComponent(text); } previous = text; } Thanks and regards, Janak >-----Original Message----- >From: [EMAIL PROTECTED] >[mailto:[EMAIL PROTECTED] Behalf Of >[EMAIL PROTECTED] >Sent: Thursday, August 09, 2007 4:01 PM >To: [email protected] >Subject: [ULC-developer] StackOverflowError when setting >nextFocusableComponent on many ULCTextFields > > > >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 _______________________________________________ ULC-developer mailing list [email protected] http://lists.canoo.com/mailman/listinfo/ulc-developer
