Hi
I want to have a frame that it has 9 planes with red and blue and green color and I set the frame as a borderlayout manager but it doesn't show anything.please help me.thanks
(the LightsNPlanesApp
is correct and can be run correctly but the MainFrame is not correct because it doesn't show anything)
The MainFrame:(just the main method)
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
MainFrame frame = new MainFrame();
addComponentsToPane(frame.getContentPane());
frame.pack();
frame.setVisible(true);
}
private void addComponentsToPane(Container pane) {
pane.add(new LightsNPlanesApp(), BorderLayout.PAGE_START);
pane.add(new LightsNPlanesApp(), BorderLayout.CENTER);
pane.add(new LightsNPlanesApp(), BorderLayout.PAGE_END);
}
});
}