int supportedButtons[] = new int[numButtons]; getSupportedButtons(supportedButtons); buttons = new LinuxAxis[numButtons]; for(int i=0;i<numButtons;i++) { buttons[i] = createButton(i, supportedButtons[i]);  }
int supportedButtons[] = new int[numButtons]; buttons = new LinuxAxis[numButtons]; if(numButtons>0) { getSupportedButtons(supportedButtons); for(int i=0;i<numButtons;i++) { buttons[i] = createButton(i, supportedButtons[i]);  } }
    private void createButtons(int numButtons) {                int supportedButtons[] = new int[numButtons];        getSupportedButtons(supportedButtons);        buttons = new LinuxAxis[numButtons];        for(int i=0;i<numButtons;i++) {            buttons[i] = createButton(i, supportedButtons[i]);            //axesArray.add(buttons[i]);        }    }