Or put it in an initialization block by surrounding the code with { }
Scott
> On Nov 12, 2021, at 5:00 AM, Pieter van den Hombergh
> wrote:
>
>
> you are calling a method in the class body, but there you can only do
> declarations (of fields and methods). To do this kind of call you must be
you are calling a method in the class body, but there you can only do
declarations (of fields and methods). To do this kind of call you must be
inside a method. Move the call to setEnabled(...)to inside a method or into
the constructor. The most appropriate method for this might be something
init()