Currently I'm getting the selected button in this way, but I don't if this is the right/best method. MAybe there something more easy or object oriented than this.
private int getFilterType(JRadioButton... buttons) {
for (int i = 0, n = buttons.length; i < n; i++) {
if (buttons[i].isSelected()) {
return i + 1;
}
}
return buttons.length + 1;
}