Hi. I have been working this grid bag panels the last 3 days. Keep overlapping won't budge move or anything - nothing I do will stop it from overlapping. I am missing something here, I cannot se the wood for the trees. Can some HELP ? must be some minor thing ???
[ December 17, 2002: Message edited by: achana chan ]
I just glanced your code...It looks like you are not using JFC and AWT Components in the same application.If your doing this so this would problem i see.Another one is I see your using BorderLayout .Whea your using BorderLayout,Make sure that you remove OLD component which is been added to Center and add New One.This was one of the problem what i observed very Long back.I don't know whetehr that been fixed or not yet. I don't know how much i am helpful the above info is.
Have you forgotten to set the constraints here, or I have I missed where you are setting them?
Just on the side: you can add components this way as well:
works fine and reduces the lines - which might help you to check the constraint settings. Why have you commented out the setLayout(gridBag) in the ClientInfo constructor? You seem to have just missed to add all components together with their GridBagConstraints. The consequence is, that they get added with FlowLayout - which mixes up everything, of course. Chantal
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
posted 17 years ago
Hi All. I use j2sdk1.4.0_01 on Linux RedHat7.1 (kernel 2.4.2) and Apache2/Tomcat1.4.0 I have been advised not to use SWING if I can help it because it slows things down. Thru jiggling around with the <APPLET...width height> tag I managed to put together a half-way workable solution, but very messy and unstable. I need 2rows x 2columns : a column of data on the NORTHWEST, image in NORTHEAST and the botton row has a text area with GridWidth=2 ie spanning both columns .
This is the code that goes with it, a tat messy, but getting there...
By the way, for all of you who helped me so much in the past : anyone of you living in NY ? [ December 17, 2002: Message edited by: achana chan ]