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:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| 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:
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.