my dog learned polymorphism*
The moose likes Swing / AWT / SWT and the fly likes list of component not displayed Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "list of component not displayed " Watch "list of component not displayed " New topic
Author

list of component not displayed

mark smith
Ranch Hand

Joined: Apr 05, 2005
Posts: 246
hi

in a class who extends a JPanell, i have a list of JLabe
this class is added to a JFramel
the jframe is displayed but not the jlabel



in the constructor of the class i have



any idea?

thanks
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4523
    
    5

Insufficient information. Without knowing to what Container class you are adding the JLabels, and what Layout Manager that container has, I wouldn't want to guess at the reason.


luck, db
There are no new questions, but there may be new answers.
mark smith
Ranch Hand

Joined: Apr 05, 2005
Posts: 246
Darryl Burke wrote:Insufficient information. Without knowing to chat Container class you are adding the JLabels, and what Layout Manager that container has, I wouldn't want toguess at the reason.


like i wrote, the container class is a JPanel

Rob Camick
Ranch Hand

Joined: Jun 13, 2009
Posts: 2156
    
    7
We are not mind readers. You still have not provided enough information.

Post your SSCCE that demonstrates the problem.
mark smith
Ranch Hand

Joined: Apr 05, 2005
Posts: 246
all the code



other class

Rob Camick
Ranch Hand

Joined: Jun 13, 2009
Posts: 2156
    
    7
Did you add any debug code to make sure the loop is being executed?
mark smith
Ranch Hand

Joined: Apr 05, 2005
Posts: 246
initialization problem.....

lblJournee size is 0.... so the loop is not executed......

Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19656
    
  18

Which makes sense since you loop to the size of your List, not the size of your array. And at that time, the List is of course still empty.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: list of component not displayed
 
Similar Threads
a challenge; contest if you will
enabling & disabling menuitems
Syntax problem
what layouts to use
iterate problem in struts2