import javax.swing.JFrame; public class WatermellonViewer { public static void main ( String[] args ) { JFrame frame = new JFrame(); frame.setSize(400,300); frame.setTitle("Watermellon"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); Watermellon w= new Watermellon(); frame.add (w); frame.setVisible(true); } }