Created
February 21, 2012 19:22
-
-
Save SethTisue/1878299 to your computer and use it in GitHub Desktop.
two NetLogo InterfaceComponents in one frame
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.swing.JFrame | |
import java.awt.FlowLayout | |
import org.nlogo.lite.InterfaceComponent | |
object Test extends App { | |
val path = "/Applications/NetLogo 5.0/models/Sample Models/" | |
java.awt.EventQueue.invokeAndWait( | |
new Runnable { | |
override def run() { | |
val frame = new JFrame | |
val comp1 = new InterfaceComponent(frame) | |
val comp2 = new InterfaceComponent(frame) | |
frame.setSize(1000, 800) | |
frame.setLayout(new FlowLayout) | |
frame.add(comp1) | |
frame.add(comp2) | |
frame.setVisible(true) | |
comp1.open(path + "Earth Science/Fire.nlogo") | |
comp2.open(path + "Biology/Slime.nlogo") | |
} | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment