Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
java
java
import groovy.swing.SwingBuilder
import java.awt.GridLayout
import javax.swing.JFrame

SwingBuilder swing = new SwingBuilder()
swing.frame(defaultCloseOperation: JFrame.EXIT_ON_CLOSE, pack: true, show: true) {
  panel(layout: new GridLayoutgridLayout(cols: 2, rows: 5)) {

    (0..<10).each {
      println it
      swing.label it.toString()
    }

  }
}