简体   繁体   English

在Jade中使用集成GUI构建代理

[英]Building agents with integrated GUI in jade

I want to create a Multi Agent application integrated with UI. 我想创建一个与UI集成的Multi Agent应用程序。 Up to now i have create some agent applications, but the problem was i don't know how to integrate UI. 到目前为止,我已经创建了一些代理应用程序,但是问题是我不知道如何集成UI。

It could be a great help if anyone could provide me tutorial or example to start on.] Thanks. 如果有人可以提供我的教程或示例,这可能会提供很大的帮助。]谢谢。

Well I have just created instances of windows. 好吧,我刚刚创建了Windows实例。

windowInstace= new guiWindow();) 

then use the variables in a cyclic-behaviour eg: 然后在循环行为中使用变量,例如:

if (windowInstace.start()==true) 
{
     startMethod();
 }

If you're going to do this check out the takedown method for cleanup. 如果要执行此操作,请检查删除方法以进行清理。 It also helps by closing the GUI if the agent dies. 如果代理程序死亡,也可以通过关闭GUI来提供帮助。

protected void takeDown()
{
        System.out.println(""+window);

    if(window!=null)
    {
            window.dispose();

    }
            removeBehaviour(checkForParts);


}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM