Question: Correct the syntax errors in the following program: public class RTwo extends JFrame { public RTwoProgram () { private JLabel length,width,area; setTitle (Good day Area);
Correct the syntax errors in the following program:
public class RTwo extends JFrame
{
public RTwoProgram ()
{
private JLabel length,width,area;
setTitle ("Good day Area");
length = JLabel ("Enter the length);
width = JLabel ("Enter the width);
area = JLabel ("Area: ");
containerPane = ContentPane () ;
pane.setLayout (GridLayout (4,1));
setSize (WIDTH,HEIGHT);
setVisible () ;
setDefaultCloseOperation(Exit_ON_CLOSE);
}
public static void main (String args [])
{
RTwoProgram R2 = new RTwoProgram () ;
}
}
Please write the program in JAVA
PLease make copy paste available
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
