Hi Reji,
JPanel jp = new JPanel();
> jp.add(IJ.getInstance().toolbar);
>
> But this is giving me NullPointerException. Any help would be highly
> appreciated.
>
The only opportunity for NullPointerException I see there is that
IJ.getInstance() could be returning null. It does that before the ij.ImageJ
singleton is created. Did you try putting "new ImageJ();" before calling
IJ.getInstance()?
-Curtis
On Mon, Nov 22, 2010 at 4:26 PM, reji <
[hidden email]> wrote:
> Hi,
>
> I am trying to add ImageJ toolbar to my Swing application. I tried the
> following after changing the visibility of toolbar.
>
> JPanel jp = new JPanel();
> jp.add(IJ.getInstance().toolbar);
>
> But this is giving me NullPointerException. Any help would be highly
> appreciated.
>
> thanks,
> Reji
> --
> View this message in context:
>
http://imagej.588099.n2.nabble.com/Use-ImageJ-toolbar-in-Swing-application-tp5764666p5764666.html> Sent from the ImageJ mailing list archive at Nabble.com.
>