import javax.swing.JFrame; import java.util.Scanner; // After Frame created // 1) Change the size to a width of 640 and height of 480 pixels // 2) Change the title of window to "New Title" public class Driver { public static void main (String [] args) { JFrame mf = new JFrame("Insert title here"); mf.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); mf.setVisible(true); Scanner in = new Scanner(System.in); System.out.print("Hit enter to see effects"); in.nextLine(); mf.setSize(640,480); mf.setTitle("New title"); } }