Search:

Type: Posts; User: Voodoo

Search: Search took 0.10 seconds.

  1. Thread: JComboBox

    by Voodoo
    Replies
    9
    Views
    1,594

    Re: JComboBox

    =)) you're welcome
  2. Thread: JComboBox

    by Voodoo
    Replies
    9
    Views
    1,594

    Re: JComboBox

    File fi = new File(path);
    if (fi == null || !fi.exists()) return new ImageIcon(Bikes.class.getResource(path)); // web or Jar
    else return new ImageIcon(path); // local folder
  3. Thread: JComboBox

    by Voodoo
    Replies
    9
    Views
    1,594

    Re: JComboBox

    your path is invalid hence F is NULL and you end up with NullPointerException at the statement if (F.exists())
  4. Thread: JComboBox

    by Voodoo
    Replies
    9
    Views
    1,594

    Re: JComboBox

    ...tell me how the path looks like. Remember that java is CASE SENSITIVE and window isn't.
  5. Thread: JComboBox

    by Voodoo
    Replies
    9
    Views
    1,594

    Re: JComboBox

    icocijan
    Sure, you can access either from the web OR from a folder or from a JAR file. The code you wrote is good for a) web, b) Jar file you can circumvent the problem as following (access...
Results 1 to 5 of 5