Ich hab mehrere Icons in Paketen gespeichert.
Die Pakete lauten u.A.
resource.img.tango.16x16.actions
resource.img.tango.16x16.animations
...
resource.img.tango.22x22.actions
resource.img.tango.22x22.animations
...
resource.img.tango.32x32.actions
resource.img.tango.32x32.animations
...
Einer existierende JTable jt soll jetzt in die linke spalte ein beliebiges Icon aus den obigen Paketen hinzugefügt werden können.
Folgender Code führt zu einer NullPointerException
Was mach ich falsch?
Die Pakete lauten u.A.
resource.img.tango.16x16.actions
resource.img.tango.16x16.animations
...
resource.img.tango.22x22.actions
resource.img.tango.22x22.animations
...
resource.img.tango.32x32.actions
resource.img.tango.32x32.animations
...
Einer existierende JTable jt soll jetzt in die linke spalte ein beliebiges Icon aus den obigen Paketen hinzugefügt werden können.
Folgender Code führt zu einer NullPointerException
Code:
jt.setValueAt(new ImageIcon(getClass().getResource("dialog-error.png")), 0, 0);
Was mach ich falsch?