Search:

Type: Posts; User: relixus

Search: Search took 0.07 seconds.

  1. Replies
    10
    Views
    2,681

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

    is poppy.jpg in the same directory as your java file? u should put them in the same folder.
  2. Replies
    10
    Views
    2,681

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

    when you compile your project into a jar file the image for your button will be included inside the jar file, and you will have problems referencing to it directly, u have to use...
  3. Replies
    10
    Views
    2,681

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

    try this:

    Icon icon = new ImageIcon(getClass().getResource("Poppy.jpg"));
Results 1 to 3 of 3