I can not find the error to save my life. The error is \"constraint must be a string (or null)\" I dont know why it is giving me this error, I have to be missing something s
You are giving dataPane a BorderLayout, but then trying to use GridBagConstraints when adding components to it --- not allowed, and even if allowed, just doesn't make sense.
Instead you have one of two options:
Edit
You state in comment:
so I use dataPane = new JPanel(new GridBagLayout()); then add it by add(dataPane);
Yes, it is fine to use a GridBagLayout, but I'm not sure what you mean by your second point, the one re add(dataPane)
as that appears unrelated to your original problem.