Is there a way to get a new instance of ShoppingCart injected via a standardized way (dependency injection)?
mark goking wrote:did you try calling the jTable.setRowSorter() in the table header's event method when it is clicked?
K. Tsang wrote:No title for server because no GUI.
Roel De Nijs wrote:Hi Patrick,
I also used the singleton pattern and had just 1 getInstance() method without any parameters. I can hear you think: "but how did you pass the database location" Well I extended the sun interface and added a method to initialize my Data-class and that method had the parameter with the database location. This init-method must be called first, so before any other call to the Data instance was made. If you called the read-method (or any other method) before the init-method, you got an IllegalStateException.