Search:

Type: Posts; User: copeg

Search: Search took 0.10 seconds.

  1. Replies
    6
    Views
    2,037

    [SOLVED] Re: Can't Import AWT Image into custom JPanel

    Sorry, that was my fault...I edited the code...you should be able to read the returned URL using ImageIO.
  2. Replies
    6
    Views
    2,037

    [SOLVED] Re: Can't Import AWT Image into custom JPanel

    Use getClass().getResource(), where the parameter to getResource is the path (relative to the class in the package) the image is located. For example

    public class MyClass extends JPanel{
    ...
Results 1 to 2 of 2