Add JFrame example to template method