I haven’t done any swing programming in a while, so I’m looking for some GUI examples that are at least close to what I’m trying to do.
The gui that I’ll need to be representing is small nodes (let’s say ants) travelling around collecting food from food piles (which just means small nodes travelling to bigger nodes). Once the node (ant) takes a piece of food, the pile shrinks a bit and the ant takes it back home (to ANOTHER circle).
This SOUNDS pretty trivial, but all of the boilerplate involved in setting up a java GUI just makes little logical sense to me, and the GUI is such a small piece of my project. Any examples that would be great for this style of project would be greatly appreciated.
Thanks!
You could take a look at the code project associated with the College Board’s Advanced Placement Computer Science exam, called GridWorld. As the name implies, it is a discrete, grid-based simulation that is fairly powerful and flexible, and might even serve as a foundation for your entire project. I believe it is open source and the GUI portion of it is already built and functional. Even if you cannot adapt it directly to your needs, it may still give you a lot of hints.
Also, the student manual provides a nice, readable overview of the code and how it works.