• 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
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

Gui problem

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am new one to this forum.
I am facing the problem with swing components.
I am having the tabbedpane on which i have added the panel with gridbaglayout.In the panel I have different kind of swing components like JTable,JTextField,JTextArea etc.
when i put the huge value in the textField or cells of table and when i click on remaining part of tabbedpane on which my panel is not there.
the TextField and the cells used to get expand horizontally to show the whole value entered.
how to avoid this?
Thanks in advance
gaurav
 
Ranch Hand
Posts: 1535
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
GridBagLayout is very respectful of and attentive to the preferred sizes of its child components. Try setting the number of columns for the JTextField and setting a preferredSize or a preferredScrollableViewportSize for the JTable.
 
Ranch Hand
Posts: 164
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Layout managers have always given me headaches, my advice is don�t use layout managers
 
Author
Posts: 986
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Unnar Bj�rnsson:
my advice is don�t use layout managers



Well I strongly disagree with Mr. Bj�rnsson on this point. It might be good advice to avoid GridBagLayout, though.
 
Message for you sir! I think it is a tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic