Is there a way 开发者_StackOverflow社区to check whether a button is enabled is set to true or false through code?
boolean enabled = button.isEnabled()
Just in case you are not aware of it Sun has put all the documentation for their Java classes online. This should be your first port of call for questions on the Java SDK classes. For documentation on JButton. You are obviously welcome to ask questions here as well :)
精彩评论