Hello,
When I run the following program, the applet window displays nothing. I will be grateful for any help.
import javax.swing.*;
import java.awt.*;
public class BoxPanel extends JPanel
{
private JTextField label1, label2;
public BoxPanel()
{
setLayout(new BoxLayout(this, BoxLayout.X_AXIS));
label1 = new JTextField(20);
label2 = new JTextField(20);
add(label1);
add(label2);
}
}
import javax.swing.*;
import java.awt.*;
public class App extends JApplet
{
private JLabel label1, label2;
private BoxPanel panelA, panelB;
public void init()
{
panelA = new BoxPanel();
Container c = getContentPane();
c.add(panelA);
}
}
Thank you!