Posted by
CARL Philippe (LBP) on
Feb 14, 2018; 12:41pm
URL: http://imagej.273.s1.nabble.com/grid-setConstraints-issue-with-Choice-tp5020048p5020090.html
Hi Michael,
Your suggestion was indeed correct and I was then able to compile the GenericDialogExt code after disabling 2-3 things from the code (like code referring to "((DialogListener)dialogListeners.elementAt(i)).dialogItemChanged(this, e)").
But then when I try to compile the code that using this newly compiled class it doesn't accept that I use:
public boolean dialogItemChanged(GenericDialogExt gd, AWTEvent e)
but I have to overwrite the method using:
public boolean dialogItemChanged(GenericDialog gd, AWTEvent e)
But if I do so then there isn't any more a dialogItemChanged detection on the defined GenericDialogExt window.
How can I solve this new issue?
I thank you very much in advance for your help on this one.
Philippe
-----Message d'origine-----
De : ImageJ Interest Group [mailto:
[hidden email]] De la part de Michael Schmid
Envoyé : mardi 13 février 2018 16:02
À :
[hidden email]
Objet : Re: grid.setConstraints issue with Choice
Hi Philippe,
my guess is that the ImageJ class loader needs a constructor with no argument for Compile&Run, e.g.
public GenericDialogExt() {
this("");
}
Java seems to create a no-argument constructor by itself only if there is no other constructor (The GenericDialog has a constructor with a String argument).
https://stackoverflow.com/questions/3078389/why-do-we-need-a-default-no-argument-constructor-in-java#4490416Michael
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html