title: Numeric Keypad more efficient way
body: <p>Is there more efficient way to add button R, 0 and E? Is it possible to somehow add them to the array?</p>
  
  <pre><code>public Keypad() {
          setTitle("Keypad");
          setSize(220, 250);
          setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          setLocationRelativeTo(null);
          setLayout(new GridLayout(4, 3, 2, 2));
  
      JButton[] buttonArray = new JButton[10];
      for (int i = 1; i &lt; buttonArray.length; i++) {
          buttonArray[i] = new JButton(String.valueOf(i));
          add(buttonArray[i]);
          buttonArray[i].addActionListener(this);
      }
  
      add(buttonR);
      add(button0);
      add(buttonE);
  
      setVisible(true);
      setResizable(false);
  }
  </code></pre>