Everything else seems to be working fine so far besides the pesky JLabel classes. What do you guys and girls suggest I change for this program to work because I can't seem to understand the problem. By the way, the programming project is: Modify the intropanel class of the layoutdemo program so that it uses a box layout manager. Use invisible components to put space before and between the two labels on the panel.
import java.awt.*;
import javax.swing.*;
@SuppressWarnings("serial")
public class IntroPanel extends JPanel
{
// ------------------------------------------------------------------------------
------------
// Sets up this panel with two labels
// ------------------------------------------------------------------------------
------------
public IntroPanel()
{
setBackground(Color.green);
JLabel 11 = new JLabel("Box Layout Manager Demonstration");
JLabel 12 = new JLabel("This is an example of a box layout manager.");
Component asinineProgramContainer1 = new JLabel("");
Component asinineProgramContainer2 = new JLabel("");
asinineProgramContainer1.setVisible(false);
asinineProgramContainer2.setVisible(false);
Box mainVerticleBox = Box.createVerticalBox();
Box labelBox = Box.createHorizontalBox();
Box invisibleContentBoxTop = Box.createHorizontalBox();
Box invisibleContentBoxBottom = Box.createHorizontalBox();
invisibleContentBoxTop.add(asinineProgramContainer1);
labelBox.add(11);
labelBox.add(Box.createRigidArea(new Dimension(100,100)));
labelBox.add(12);
invisibleContentBoxBottom.add(asinineProgramContainer2);
mainVerticalBox.add(invisibleContentBoxTop);
mainVerticalBox.add(Box.createGlue());
mainVerticalBox.add(labelBox);
mainVerticalBox.add(Box.createGlue);
mainVerticalBox.add(invisibleContentBoxBottom);
add(mainVerticalBox);
}
}