This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes How can i set DefaultButton.Looks Simple,but little tricky Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How can i set DefaultButton.Looks Simple,but little tricky" Watch "How can i set DefaultButton.Looks Simple,but little tricky" New topic
Author

How can i set DefaultButton.Looks Simple,but little tricky

Bhagya Tangutur
Ranch Hand

Joined: Oct 21, 2002
Posts: 88
Gurus,
Here is my question.I want to make myButton as Default Button.I am using TextPane in the same Frame.
I Tried to set rootPane.setDefaultButton(mYButton);This is not working,because as for the java API.It says if you are using components such as JTextPane it consumes ActivationEvent.
Any thoughts or work arounds .would be great help.
Thanks
[ November 22, 2002: Message edited by: kumar B ]

Sun Certified Java Programmer
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How can i set DefaultButton.Looks Simple,but little tricky
 
Similar Threads
Last question
Processing different ActionEvents in actionPerformed()
Problems interrupting a thread
How to get image (icon) from a JButton
firing an event when it has not been fired