خرید بک لینک

Vote count: 0

Im using radio buttons JRadioButton and i read in the javadocs that i can associate a certain String to it with the method setActionCommand(String a) so that when i invoke public void actionPerformed(ActionEvent e) i can choose what the action will do depending on that string called by e.getActionCommand()

This is exactly the same i do with JTextFields but using first JComponent.setName() and then fetching it back with JComponent.getName()

Actually this last way of doing it also works for JRadioButton so my question is, why having 2 similar methods or what is the difference, any reason to use one or the other?

[I actually would prefer to use the last one because then i could integrate it better with my JTextfield code]

asked 4 mins ago

برچسب: نویسنده: استخدام کار تاريخ: سه شنبه 28 ارديبهشت 1395 ساعت: 17:58

صفحه بندی