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.FlowLayout
import java.awt.GridLayout
import javax.swing.JFrame

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

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

  }
}