When using the HttpServlet you keep state using sessions, "HttpSession". However when building a desktop application or building a GUI application, what do you use? Let say to keep track of an ArrayList? Everytime a button is clicked, the ArrayList decrements and something new shows on the Window. How do I do that??
You've not given enough information to enable a detailed, specific answer, but you might gain some insight by reviewing this tutorial that discusses how to program a JButton and other components with ActionListeners using Java's Swing. The second example on that page sounds a little like what you're describing.
Edit: My answer doesn't seem to corresponds to your topic "Keeping State?" so I apoligize if I've missed your point.
Always learning Java, currently using Eclipse on Fedora.
Linux user#: 501795
Sometimes you feel like a nut. Sometimes you feel like a tiny ad.