Create the observer pattern by using the JButton exmaple.