> I have two problems with adding pictures to a JPanel.
>
[quoted text clipped - 4 lines]
> How can I solve this problem? The answer to FAQ Q3.1 says something about
> threads.
More specifically, it warns against "..blocking the
event dispatching thread (EDT)."
>..Is there an other solution?
While still blocking the EDT? No.
See 3.2. It is not that difficult, once you get used to it.
> And the other problem: all pictures are added in one line. I would like to
> have a newline after each 5 pictures.
> I tried FlowLayout and GridLayout in combination with "SwingConstants.LEFT"
> or ...RIGHT...
Have you tried reading the JavaDocs? *
> Is there a SwingConstant NewLineAfter or something like that?
> I think GridLayout is best suitable layout for that kind of positioning the
> pictures, but I don´t know how to do...
<http://java.sun.com/j2se/1.5.0/docs/api/java/awt/GridLayout.html#GridLayout(int,
%20int)>
setLayout( new GridLayout(0,4) );
* Good entry point to the on-line JavaDocs..
<http://java.sun.com/j2se/1.5.0/docs/api/overview-summary.html>

Signature
Andrew Thompson
physci.org 1point1c.org javasaver.com lensescapes.com athompson.info
A By-Product Of The TV Industry