Works with normal = declaration but not with .add() function call? Why?

I still have some problems in relation to my earlier post:

http://forum.java.sun.com/thread.jspa?threadID=5164571&tstart=0

Help is still warmely appreciated! Thanks already to you Franzis.

So I try to add several JScrollPanes into on Container variable allComponents.

I don't understand why in my program

allComponents = jspane;

works but

allComponents.add(jspane);

does not.

Same is true for Jpanel objects. In my program

allComponents = panel;

works but

allComponents.add(panel);

does not. Why is this?

Still I necessarily need to work with a add() function.

So where is the problem?

The whole source code is at:

http://forum.java.sun.com/thread.jspa?threadID=5164571&tstart=0

Message was edited by:

wonderful123

null

[861 byte] By [wonderful123a] at [2007-11-27 2:10:00]
# 1
I added a response in your original message: http://forum.java.sun.com/thread.jspa?messageID=9629812Let's keep to it since splitting things across two posts might be confusing.
pthorsona at 2007-7-12 2:01:13 > top of Java-index,Desktop,Core GUI APIs...