A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Swing / AWT / SWT
How to select JButton?
Joined: Feb 14, 2011
Jul 30, 2011 15:30:39
How can i programmatically select button? Like JOptionPane.showOptionDialog(......,Object initialValue) .
Joined: Jun 13, 2009
Jul 30, 2011 16:48:44
that demonstrates the problem.
Joined: Oct 13, 2005
Jul 30, 2011 20:55:23
Why would you want to select a button programmatically? Have you been through the Java™ Tutorials?
Joined: Oct 27, 2005
Jul 31, 2011 06:56:44
I think that requestFocus or requestFocusInWindow should do the trick. You may have to use EventQueue.invokeLater to call this, even if you call it from the EDT itself, because I think a delayed event will be necessary.
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions
How To Answer Questions
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: How to select JButton?
How to select a folder
Who attempted Part 1 please answer
How to select a tray in java print service?
Selecting JTree node
Selecting the directory
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015