I'm writing a simulation in Java in Netbeans, and the actual non-graphical coding is mostly done. However, I'd like to do a graphical implementation where I use icons to represent the variables changing in the simulation.
The simulation simulates trucks driving along roads, and I'd like an icon to represent every truck. The code shows each truck and each road as a separate object, each with their own attributes, but only a few of the attributes need to be modeled in the graphical implementation. For instance, the position of each truck is an attribute of the road, showing how far along the road the truck has traveled.
What is the easiest way to model this in a graphical interface? I assume I need to assign an icon to a graphical structure in Netbeans and then have it update itself according to the distance attribute of the road, but I have no idea how to approach this.
Any help will be appreciated.