def createRadioButton(name, ac, ap): button = JRadioButton(name, actionPerformed=ap) button.setActionCommand(ac) return button
def __addRadioButton(self, label, listener): button = JRadioButton(label) button.setActionCommand(label) button.addActionListener(listener) self.add(button, self.__createRadioConstraints(label)) return button