Hi, I want to create a list of GridBagPanel.Constraints.
I read it in the scala programming book, that there is a cool for-yield construction, but I probably haven't understood the way it works correctly, because my code doesn't compile. Here it is:
val d = for {
i <- 0 until 4
j <- 0 until 4
} yield {
c = new Constraints
c.gridx = j
c.gridy = i
}
I want to generate a List[Constraints] and for every constraint set different x,y values so later, when I later add the components, they're going to be in a grid.