Glowman554 / BetterNudel

Static fields of the parent class should not be accessed through child class instances JAVA-W1030
Anti-pattern
Major
2 years ago2 years old
EXIT_ON_CLOSE should be accessed through WindowConstants, not JFrame
 84	public GUI()
 85	{
 86		setResizable(false);
 87		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); 88		setBounds(100, 100, 305, 384);
 89		contentPane = new JPanel();
 90		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
EXIT_ON_CLOSE should be accessed through WindowConstants, not JFrame
 84	public GUI()
 85	{
 86		setResizable(false);
 87		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); 88		setBounds(100, 100, 305, 384);
 89		contentPane = new JPanel();
 90		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));