1 Reply Latest reply: Jul 29, 2008 1:55 PM by 843851 RSS

    Jpg in HTextButton

    843851
      Hello everyone,

      I'm traying to show a jpg image inside a HTextButton but I can't.
      I've created an array with HTextButton and for every of them I've done this:

      Image imgs[] = new Image[12];
      imgs[i] = new ImageIcon( i + ".jpg").getImage();
      .
      .
      .
      botones [j] = new HTextButton();
      botones[i][j].setBounds(x,Y,ach,alt);
      botones[i][j].setForeground(Color.white);
      botones[i][j].setBackground(Color.orange);
      botones[i][j].setBackgroundMode(HVisible.BACKGROUND_FILL);

      so far, everything is ok I can watch all the buttons, however, when I write this line in an actionPerformed method:

      botones[0][0].setGraphicContent(imgs[3], HVisible.NORMAL_STATE);
      botones[0][0].repaint();

      I can't see the jpg picture in the button.

      Could somebody help me, please?