for (int i = 0; i < m_categoryButtons.length; i++) {
final int j = i;
switch (i) {
case 0:
m_categoryButtons[i] = new ImageButton(bagcat[0],
bagcat[1], bagcat[2]);
m_categoryButtons[i].setToolTipText("Bag");
break;
case 1:
m_categoryButtons[i] = new ImageButton(potioncat[0],
potioncat[1], potioncat[2]);
m_categoryButtons[i].setToolTipText("Potions");
break;
case 2:
m_categoryButtons[i] = new ImageButton(berriescat[0],
berriescat[1], berriescat[2]);
m_categoryButtons[i].setToolTipText("Food");
break;
case 3:
m_categoryButtons[i] = new ImageButton(pokecat[0],
pokecat[1], pokecat[2]);
m_categoryButtons[i].setToolTipText("Pokeballs");
break;
case 4:
m_categoryButtons[i] = new ImageButton(tmscat[0],
tmscat[1], tmscat[2]);
m_categoryButtons[i].setToolTipText("TMs");
break;
}