posted 17 years ago
hello,
I tried to add swing buttons in a jpanel using flowlayout(instead of grid layout) and then i added this panel to a container with border layout to the south.but the page is blank.here is my code
public void init() {
resize(150,475);
Container content = getContentPane();
content.setLayout(new BorderLayout());
JPanel panel=new JPanel(new FlowLayout());
callback.setActionCommand("callback");
callback.addActionListener(this);
panel.add(callback);
callback.setBackground(Color.pink);
noanswer.setActionCommand("noanswer");
noanswer.addActionListener(this);
panel.add(noanswer);
noanswer.setBackground(Color.pink);
content.add(panel, BorderLayout.SOUTH);
}
Is this code correct?if not pls help me with some codes
Thanks