Why I cannot see the label:

Why I cannot see the label:

class MyFrame extends Frame{
public MyFrame(){
Container container = new Container();
Label label = new Label("1111111");
container.add(label);
learnAsked:
Who is Participating?
 
objectsConnect With a Mentor Commented:
u don't add container to your frame

class MyFrame extends Frame{
public MyFrame(){
Container container = new Container();
Label label = new Label("1111111");
container.add(label);
add(container);
0
 
ellandrdCommented:
why not just do this:

container.add(new Label("1111111"));
0
 
matthew016Commented:
did you add :   this.setVisible(true);    ?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.