View Single Post
  #3 (permalink)  
Old 04-22-2007, 11:05 PM
pegitha pegitha is offline
Member
 
Join Date: Apr 2007
Location: Indiana
Posts: 84
pegitha is on a distinguished road
Send a message via Skype™ to pegitha
NOt sure this is what you want but I usually make a singleton class called Application State. Then I control what is in it with methods such as below.
Code:
public Object getItem(String key) { return stateItems.get(key); } public void setItem(String key, Object item) { stateItems.put(key, item); } public void removeItem(String item) { stateItems.remove(item); } public void cleanUp() { stateItems.clear(); }
It is not configured for java 5.0. This is old code, but you can update. I think I got it from the pet shop example on Sun.
Hope this helps.
p
Reply With Quote