[Solved] @Override command is not compatible with ‘Ready to Program Java?’ [closed]


Looking it up, the thing you’re using (“Ready to program Java”) comes with Java 1.4. It’s ancient.

So … no, @Override isn’t allowed, and also you can not set the layout directly on the JFrame.

See: http://docs.oracle.com/javase/1.4.2/docs/api/javax/swing/JFrame.html#setLayout(java.awt.LayoutManager)

By default the layout of this component may not be set, the layout of
its contentPane should be set instead. For example:
thisComponent.getContentPane().setLayout(new GridLayout(1, 2))

An
attempt to set the layout of this component will cause an runtime
exception to be thrown. Subclasses can disable this behavior.

1

solved @Override command is not compatible with ‘Ready to Program Java?’ [closed]