• 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

GridBagLayout resizing is making component invisible

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So I'm working on an app that has a JSplitPane. The right pane of the JSplitPane is a GridBagLayout ( I didn't choose it, the previous developers did). In it is a JTextField that is approx 10 characters wide.

*Problem* If I make the GridBagLayout pane larger, everything works fine. But if I shrink it by setting the JSplitPane divider to halfway, the text field completely disappears, even though there is obviously more space to the right of it. I've set the JTextField's gridwidth to be the maximum possible, but it still disappears. Any suggestions???
 
John Danek
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I found a fix. By reducing the gridwidth, and changing the anchor to EAST, it now behaves properly. It was WEST previously.
 
reply
    Bookmark Topic Watch Topic
  • New Topic