private JButton addKeybindButton(JPanel panel,String buttonText){
  GridBagConstraints gbc=new GridBagConstraints();
  gbc.anchor=GridBagConstraints.EAST;
  gbc.fill=GridBagConstraints.HORIZONTAL;
  gbc.insets=new Insets(0,0,5,0);
  gbc.gridx=1;
  gbc.gridy=keybindButtonGridYCounter++;
  JButton jbtn=new JButton(buttonText);
  panel.add(jbtn,gbc);
  return jbtn;
}

private JButton addKeybindButton ( JPanel panel , String buttonText ) { GridBagConstraints gbc = new GridBagConstraints ( ) ; gbc . anchor = GridBagConstraints . EAST ; gbc . fill = GridBagConstraints . HORIZONTAL ; gbc . insets = new Insets ( 0 , 0 , 5 , 0 ) ; gbc . gridx = 1 ; gbc . gridy = keybindButtonGridYCounter ++ ; JButton jbtn = new JButton ( buttonText ) ; panel . add ( jbtn , gbc ) ; return jbtn ; }
adds a new button to the keybinds list . this should be used in conjunction with adding a label in a 1 : 1 ratio . the new button will be added below the existing ones .
