Hello, JGO community.
When I write (Java) applications, I really don’t like having any warnings.
Right now, I am working on a simple Breakout game and I decided to use
Netbeans. Basically, I have a code that in Netbeans shows a warning,
while in Eclipse it doesn’t. I am wondering why. Here is the code:
package game;
import java.awt.Color;
import javax.swing.JPanel;
public class Board extends JPanel{
public Board(String name){
init(name);
}
public void init(String name){
setName(name);
setBackground(Color.WHITE);
setFocusable(true);
}
}
In NetBeans, there is the warning on this line:
init(name); // WARNING: Overridable method call in constructor.
I understand that this is highly irrelevant, but I just want to know how
can I fix that warning without suppressing the warnings for the constructor.