No. Use Java Swing § Can I do a different approach? No. Complete the described idea. Do not use inheritance from JComponent (or JComponent subclass) at City. City must be a class for Data § Remember Code is as important as your design. The challenge is for a good and clean design
Main(String []a){ // Constructor is protected -- cannot use new Singleton s1 = Singleton.getInstance(); Singleton s2 = Singleton.getInstance(); // Test for same instance if (s1 == s2){ // true - Objects are the same instance } } }