question: private static void createAndShowGUI ( ) { frame = new JFrame ( "BasicDnD" ) ; frame . setDefaultCloseOperation ( JFrame . EXIT_ON_CLOSE ) ; JComponent newContentPane = new BasicDnD ( ) ; newContentPane . setOpaque ( true ) ; frame . setContentPane ( newContentPane ) ; frame . pack ( ) ; frame . setVisible ( true ) ; }
target:  Create the GUI and show it. For thread safety, this method should be invoked from the event-dispatching thread.