question: public JDialog displayPanelInWindow ( final JPanel panel , String title ) { JDialog frame = new GenericJDialog ( ) ; frame . setContentPane ( panel ) ; frame . pack ( ) ; frame . setTitle ( title ) ; frame . setVisible ( true ) ; return frame ; }
target:  A copy of displayPanel except returning a subclass of Window. Here to temporarily resolve ongoing conflict between classes using generic frame and classes using window.