java - Appropriate listener for Swing JTree -
i have jtree
, , based on selection want button enabled, have used treeselectionlistener
:
tree.addteeselectionlistener(new treeselectionlistener() { @override public void valuechanged(treeselectionevent event) { okbutton.setenabled(true); } });
the button getting enabled bit late second or two. problem here?
am using correct listener?
Comments
Post a Comment