Well, I don't know if it is the fact that you have
redefined the label object again or the fact that
the dialog does not have a parent container,
be it another dialog or a frame.
But the fllowing code should be changed.
JLabel myLabel = new JLabel()
myLabel = new JLabel("Hello")
to...
JLabel myLabel = new JLabel("Hello");
or..
JLabel myLabel = new JLabel();
myLabel.setText("Hello");
then.. try to give the JDialog a parent Conatiner.
like this...
JDialog jd = new JDialog(frame, "Title of dialog", true);
|