Java GridBagLayout and JPanel Error: cannot add to layout: constraint must be a string (or null) [duplicate]
问题 This question already has an answer here : getting Exception : java.lang.IllegalArgumentException: cannot add to layout: constraint must be a string (or null) (1 answer) Closed 6 years ago . I have researched this error and I cannot seem to find a solution. I am trying to create a grid of 800 JButtons with 40 columns and 20 rows. This will eventually be used to control a domino setting up robot I am making that will tip over dominoes. I have already successfully created a grid using