Hey guys, got another question for you.
I have a program that displays a new bean on my jPanel for each piece of data that it picks up from a file. I was wondering if there is an easy way to always have it display my bean to the northwest of the jPanel.
The thing is, I can get it to set my first bean in the northwest corner, but not the rest of the beans.
I've been messing around with gridbaglayout and I have my anchor set to northwest.
I am using netbeans which makes it fairly simple to see, but thus far I can't quite figure out how to get it to display the way I want it to.
Very briefly, this is how I'm getting the bean to display on the jPanel:
GridBagConstraints gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = i;
gridBagConstraints.anchor = GridBagConstraints.NORTHWEST;
basePanel.add(mvl, gridBagConstraints);
mvl is my bean.
Any suggestions or help is appreciated as always