Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Setting a request focus on a button. HELP!

 
Ryan Schnautm
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I built a small windows program.
I have an text field and a couple labels, a checkbox group and button, I instantiated the button in the middle of a flow layout. Now, i need to set the requestFocus(); to the button, which is name calculate.
Now what do i do to set that, so when i turn my program on, i just type my numbers in and hit enter. I need to have it set to either press enter or click the calculate button, and I can not get the request focus to work correctly.
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Topic on making a button the default button for the screen so enter works.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic