Search:

Type: Posts; User: KevinWorkman

Search: Search took 0.07 seconds.

  1. Replies
    12
    Views
    1,503

    Re: setting image to panel

    You need to figure out where it thinks it's loading the file from. You can use the File class to get the absolute path.
  2. Replies
    12
    Views
    1,503

    Re: setting image to panel

    Then you need to go through a process of elimination. Are you loading the file properly? Are you sure? Use a debugger or a print statement to test your assumptions. Can you add a text-only JLabel to...
  3. Replies
    12
    Views
    1,503

    Re: setting image to panel

    You've posted when you add the BackgroundPanel to the JFrame. But what are you putting the image on? When are you adding that component to the BackgroundPanel?
  4. Replies
    12
    Views
    1,503

    Re: setting image to panel

    That's fine, but you should never have an empty catch. At least put an e.printStackTrace() inside the catch block.

    But anyway, when are you actually adding the JLabel to the JPanel?
  5. Replies
    12
    Views
    1,503

    Re: setting image to panel

    Don't use empty catch blocks like that. Is there an Exception you're hiding from yourself?
Results 1 to 5 of 5