use of nars.lab.grid2d.gui.EditorPanel in project opennars by opennars.
the class Grid2DSpace method newWindow.
public NWindow newWindow(int width, int height, final boolean exitOnClose) {
NWindow j = new NWindow("") {
@Override
protected void close() {
stop();
destroy();
getContentPane().removeAll();
if (exitOnClose)
System.exit(0);
}
};
Container content = j.getContentPane();
content.setLayout(new BorderLayout());
JPanel menu = new JPanel(new FlowLayout(FlowLayout.LEFT));
/*final JCheckBox syntaxEnable = new JCheckBox("Syntax");
syntaxEnable.addActionListener(new ActionListener() {
@Override public void actionPerformed(ActionEvent e) {
}
});
menu.add(syntaxEnable);
*/
EditorPanel editor = new EditorPanel(this);
NWindow editorWindow = new NWindow("Edit", editor);
editorWindow.setSize(200, 400);
editorWindow.setVisible(true);
content.add(menu, BorderLayout.NORTH);
content.add(this, BorderLayout.CENTER);
// initial size of the window
j.setSize(width, height);
j.setVisible(true);
return j;
}
Aggregations