This week's book giveaway is in the HTML/CSS/JavaScript forum.
We're giving away four copies of Practical SVG and have Chris Coyier on-line!
See this thread for details.
Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

setLabelFor

 
Ronnie McBob
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm working through the GUI tutorials from the Sun website.

There is one example where a JLabel's setLabelFor method is used...
I have had a look in the API documentation, but don't really understand what it's for...

Can anybody give a clearer description?

Help much appreciated!

Thanks,

Ron
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving this to the Swing / AWT / SWT / JFace forum...
 
Nigel Browne
Ranch Hand
Posts: 703
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Nigel Browne:
It is common that a label is used to describe another component. When this is the case, a program's accessibility can be improved by using the setLabelFor method to identify the component it is describing e.g So if the displayedMnemonic property is also set, the label will call the requestFocus method of the component specified by the labelFor property when the mnemonic is activated.
 
Are you okay? You look a little big. Maybe this tiny ad will help:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!