JPanel, JDialog
I have been develloping this application for months now and i worked with jinternalframe, jdialog, jpanel, jframe and many others swing components. And now suddenly all the new classes i create since yesterday do no do what i want them to do.
I have a jdialog and it wont show anything. the jdialog will pop up but it will be empty. I try many thing like instead of this.add i used this.getContentPane().add(new AccountSelectorPanel(), BorderLayout.CENTER); but wallou here is the code.
privateclass AccountSelectorextends JDialog
{
public AccountSelector()
{
aAccountSelector =this;
this.setTitle("Select an Account");
this.setSize(350, 100);
this.setLocation(50, 200);
this.setResizable(false);
this.setAlwaysOnTop(true);
this.setVisible(true);
this.setModal(true);
this.setBackground(Color.red);
this.add(new AccountSelectorPanel())
}
privateclass AccountSelectorPanelextends JPanel
{
public AccountSelectorPanel()
{
this.setLayout(null);
this.setBackground(Color.blue);
accountCombo =new JComboBox();
accountCombo.setBounds(20, 20, 220, 20);
this.add(accountCombo);
JButton close =new JButton("Close");
close.addActionListener(new ActionListener()
{
publicvoid actionPerformed(ActionEvent arg0)
{
//done();
}
});
close.setBounds(250, 20, 80, 20);
this.add(close);
}
}
private AccountSelector aAccountSelector;
private JComboBox accountCombo;
}
I create all my gui so far with this method and it is working, so what is wrong with this?
how come the others one works fine and this one doesn t

