NetLogo blank page problem

18 views
Skip to first unread message

Seth Tisue

unread,
Aug 6, 2012, 9:47:27 AM8/6/12
to netlog...@googlegroups.com
>>>>> "ceray58" == ceray58 <no_r...@yahoogroups.com> writes:

ceray58> I have embedded a NetLogo 4.1.3 model into Java (NetBeans
ceray58> 7.1.2). But the problem is the interface of the model is
ceray58> sometimes not seen and only a white page of NetLogo is
ceray58> shown. There is no bug on Java console so I can't understand
ceray58> what the problem is. There are some monitors and few buttons
ceray58> on the model's interface. Do they lead to loading problem? If
ceray58> you have any idea to get rid of this problem, please help..

Do you have any feel for what's different between the "sometimes" it
works and the "sometimes" it doesn't?

Are you embedding InterfaceComponent? Offhand, my guess would be a
layout problem, where the InterfaceComponent is too small to hold its
contents.

--
Seth Tisue | Northwestern University | http://tisue.net
lead developer, NetLogo: http://ccl.northwestern.edu/netlogo/

Seth Tisue

unread,
Aug 6, 2012, 1:05:50 PM8/6/12
to netlog...@googlegroups.com
>>>>> "pelinkcygt" == pelinkcygt <pelin...@gmail.com> writes:

pelinkcygt> I am asking although the NetLogo model works fine why the
pelinkcygt> changes in the code of the model is leading to displaying
pelinkcygt> the interface as expected or a blank page instead. If the
pelinkcygt> problem is not related to code changing, where I am wrong?

Offhand, my guess would be a layout problem, where the
InterfaceComponent is too small to hold its contents. The required
amount of space might have changed if you added, moved, or resized
elements of the interface.

You might find NetLogo's org.nlogo.awt.Tree.printComponentTree() method
useful for troubleshooting layout problems. It recursively prints the
postions and sizes of a whole tree of AWT/Swing containers and
components.

Offhand, it doesn't seem plausible to me that merely changing something
in the model's Code tab could cause the symptoms you're describing.

Versions of NetLogo prior to 5.0.2 responded poorly when not given an
adequate size by the embedding browser or application. It was fixed in
NetLogo 5.0.2:
https://github.com/NetLogo/NetLogo/commit/cd865053a98af6391496be381dfcfe5690dfdf3a
You might experimentally try upgrading to 5.0.2 and see if the problem
goes away. (You could learn something from that experiment even if you
ultimately need to get the code working with 4.1.3.)
Reply all
Reply to author
Forward
0 new messages