Figure 4. A plotted plotter
This agent shows how to write a simple GUI as a Java Bean and make it react to messages.
This is described in the MadKit user's guide, section G-Box, as the example for direct manipulation of agent acquaintances
The important part here is the initGUI() method, which instantiates a specialized JavaBean that will execute the actual plotting and makes it the agent graphical interface.
The agent itself just waits for messages, accepts only StringMessage and tries to extract an integer in the message content before giving to the plotter.