Question: Look at the following GUI application class and indicate by line number the changes that should be made to convert this to an applet using

Look at the following GUI application class and indicate by line number the changes that should be made to convert this to an applet using Swing: 

1 public class SimpleWindow extends JFrame 2 { 3 public SimpleWindow() 4

1 public class SimpleWindow extends JFrame 2 { 3 public SimpleWindow() 4 { 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 } } // Set the title. setTitle("A Simple Window"); // Specify what happens when the close button is clicked. setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE) ; // Add a label. JLabel label = new JLabel("This is a simple window."); add (label); // Pack and display the window. pack(); setVisible(true);

Step by Step Solution

3.38 Rating (164 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Answer public class SimpleWindow extends JApplet extend JApplet instead ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Starting Out With Java From Control Structures Questions!