• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

grid bag panels overlap : please HELP if you can

 
Ranch Hand
Posts: 277
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 508
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Additional comments in this thread.
 
achana chan
Ranch Hand
Posts: 277
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why not just do it like this... it's so much more readable :



And, if you are doing this as an Applet... why not generate the GUI as a HTML form instead? I see nothing in the applet that could not be generated using standard HTML widgets...
 
See ya later boys, I think I'm in love. Oh wait, she's just a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic