Re: JTextField and JButton variables can't use setEnabled(false) methods

2021-11-12 Thread Scott Palmer
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

Re: JTextField and JButton variables can't use setEnabled(false) methods

2021-11-12 Thread Pieter van den Hombergh
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()