This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to display textfield in a gridbaglayout

 
Josh Raj
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,
Using a gridbag layout & constaints i want to place a small textfield and a button near to it.when the applet window is maximized the textfield will expand upto 40-50% of the window but the button will be of same size and near to the textfield without much change.I tried a lot but the text button when maximized is moving awat frm the textfield.Help Me.
 
Campbell Ritchie
Sheriff
Pie
Posts: 47288
52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch.

Go and find Cay Horstmann's GBC class, read the link about "strike fear" and study the class. This makes GridBag much easier to use.
Difficult to tell what is going on without seeing code, but make sure
  • You set a big "x weight" on the Component you want to change size.
  • You set a 0 weight on the Component you want to stay the same size.
  • You set anchors on the components
  • You set a fill (probably HORIZONTAL) on the text field.
  •  
    Craig Wood
    Ranch Hand
    Posts: 1535
    • 0
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
     
    I agree. Here's the link: http://aspose.com/file-tools
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic