[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Why I cannot see the label:

Posted on 2007-08-08
3
Medium Priority
?
163 Views
Last Modified: 2010-04-16
Why I cannot see the label:

class MyFrame extends Frame{
public MyFrame(){
Container container = new Container();
Label label = new Label("1111111");
container.add(label);
0
Comment
Question by:learn
3 Comments
 
LVL 16

Expert Comment

by:ellandrd
ID: 19653661
why not just do this:

container.add(new Label("1111111"));
0
 
LVL 92

Accepted Solution

by:
objects earned 200 total points
ID: 19653757
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
 
LVL 9

Expert Comment

by:matthew016
ID: 19653762
did you add :   this.setVisible(true);    ?
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question