We can add an editable JTextField to a panel in one line like this
It's possible to do it that way, but you still shouldn't.
This creates an anonymous class, which sets it as not editable in the initialization block.
Doing it that way is considered bad practice though. You should just split it into multiple lines, or write a method to do it. The code will be more maintainable and easier to read that way.