Getting grid layout to work with a class that extends JFrame
In my code, I have a class extending JFrame and setting the layout to grid works and the code to add with three parameters compiles just fine but when I run it I get this:
java.lang.IllegalArgumentException: illegal component position
at java.awt.Container.addImpl(Container.java:999)
at java.awt.Container.add(Container.java:928)
at javax.swing.JFrame.addImpl(JFrame.java:479)
at java.awt.Container.add(Container.java:928)
on the add(myLabel, 1, 1);
line

