1

IM trying to scroll around a image in groovy but not work

IM using this code and appears a image static

How I could scroll with this code

panel(layout: new BorderLayout()) {
    scrollPane(size:[100,100],    
    verticalScrollBarPolicy:JScrollPane.VERTICAL_SCROLLBAR_ALWAYS) {
        panel(size:[200,100]) {
            label(icon: imageIcon(new URL("file:pokemon.png")))
        }
    }
}

Please help me.

cfrick
  • 35,203
  • 6
  • 56
  • 68
mightguy
  • 175
  • 1
  • 8

1 Answers1

1

Finally I solve with this

  scrollPane(id:'scroll',preferredSize: [200,200], constraints: context.CENTER) {



    panel(layout: new FlowLayout()) {


        label(icon: imageIcon(new URL('file:///path/pokemon.png')))
    }


      }
mightguy
  • 175
  • 1
  • 8