Search:

Type: Posts; User: ice

Search: Search took 0.14 seconds.

  1. Replies
    10
    Views
    2,678

    Re: How to display a button with an image on it?

    Thank you very much all of you, I presumed that the location of image file didn't matter..., now it displays all good.
    :)
  2. Replies
    10
    Views
    2,678

    Re: How to display a button with an image on it?

    Hi relixus

    Thank you very much for your advice, I tried to replace "Icon icon = new ImageIcon("Poppy.jpg")" with yours "Icon icon = new ImageIcon(getClass().getResource("Poppy.jpg"))", then ran it...
  3. Replies
    10
    Views
    2,678

    How to display a button with an image on it?

    Hello guys

    Below code mean to display a button with an image on it, the image is real in my computer, but it only displays a blank button. Do you know why?

    Many thanks


    package brainydraw;...
Results 1 to 3 of 4