Advertisement
Guest User

Agathed

a guest
Oct 23rd, 2008
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.52 KB | None | 0 0
  1. //In this case I have the icon and no Null Pointer Exception
  2. final JColorChooser locColorChooser = new JColorChooser();
  3. locColorChooser.addChooserPanel(new EyeDropperColorChooserPanel());
  4.  
  5. //But if I create a new class inheriting from EyeDropperColorChooserPanel I got the null pointer exception
  6.  
  7. private class EyeDropper extends EyeDropperColorChooserPanel{
  8.     public EyeDropper()
  9.     {
  10.       super();
  11.     }
  12.   }
  13. final JColorChooser locColorChooser = new JColorChooser();
  14. locColorChooser.addChooserPanel(new EyeDropper());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement