How to add images into Flowlayout?

Dear friends:

How to add images into Flowlayout?

I cannot add images into flowlayout with code:

JPanel panel =new JPanel(new FlowLayout(FlowLayout.LEFT, 4, 3));

pic1 =new DTPicture(createImageIcon("images/" + dad +".GIF",dad).getImage());

pic1.setTransferHandler(picHandler);

panel.add(pic1);

pic2 =new DTPicture(createImageIcon("images/" + mom +".GIF",mom).getImage());

pic2.setTransferHandler(picHandler);

panel.add(pic2);

pic3 =new DTPicture(createImageIcon("images/" + kid +".GIF",kid).getImage());

pic3.setTransferHandler(picHandler);

panel.add(pic3);

setPreferredSize(new Dimension(440, 330));

add(panel, BorderLayout.CENTER);

but show onthing but only small dot, not images I need,

what is wrong here?

Thanks

sunny

[1199 byte] By [sunnymanmana] at [2007-11-26 19:04:49]
# 1
if change to BorderLayout, this is good code to work, but Flowlayout, fails
sunnymanmana at 2007-7-9 20:54:07 > top of Java-index,Desktop,Core GUI APIs...
# 2
sounds like DTPicture() has no sizesee what happens if you add this linepic1.setPreferredSize(new Dimension(100,100));
Michael_Dunna at 2007-7-9 20:54:07 > top of Java-index,Desktop,Core GUI APIs...
# 3
Thanks so much,success!
sunnymanmana at 2007-7-9 20:54:07 > top of Java-index,Desktop,Core GUI APIs...
# 4
if image is null, how to remove all slope boundaries for each image so that all images and panel looks like no difference in a same plain/panel?Thanks again
sunnymanmana at 2007-7-9 20:54:07 > top of Java-index,Desktop,Core GUI APIs...