Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

TextFields  RSS feed

 
colin shuker
Ranch Hand
Posts: 750
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, does anybody know how to place several Textfields in the center of a frame, and add a 'submit' button to process the values entered in the Textfields.

I have looked at some examples, but I think they all seem to use components or sumthing, and appear only to be placed north or south in the frame. I can't figure out how to place them were I want.

Any help is much appreciated.
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
something like this?

 
Pat Hays
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Colin

See this example code:
UsingGridLayout.java
 
Swati Udas
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try this link for basic info on various layouts

http://java.sun.com/docs/books/tutorial/uiswing/TOC.html#components

and this one specifically for gridbaglayout..

http://java.sun.com/docs/books/tutorial/uiswing/layout/gridbag.html

I think gridbaglayout is a good option
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!