Hafsa Sedrati
Hafsa Sedrati

Reputation: 15

Integrate java GUI with agent app

I must to program a multi-agent system and I don't know how to integrate the agent.java with the GUI, in this time I tried to create a Hello World agent interface but I couldn't integrate between them, this is my TestJADE.class

package testjade;

import jade.core.Agent;

public class TestJADE extends Agent {
    private static final long serialVersionUID = 1L;
    protected void setup() {
         System.out.println("Hello Jade!");
         System.out.println("I'm the first Agent with you!");
    }
}

and this is my button action code

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {                                         
        // TODO add your handling code here:
        TestJADE agent = new TestJADE();
        agent.setup();
}   

is this the right way to do it??, please help me :(

Upvotes: 0

Views: 369

Answers (1)

daaif
daaif

Reputation: 26

Your GUI must be associated with an agent. To do this, the agent have to extend AgentGui Class. In the Jade platform, to create an agent, you do not use the word new key. You must call the method createNewAgent ContainerController class.

Upvotes: 1

Related Questions