在groovy中滚动图像?

问题描述 投票:1回答:1

IM试图在groovy中滚动图像但不工作

IM使用此代码并显示静态图像

我如何使用此代码滚动

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")))
        }
    }
}

请帮我。

swing groovy scroll swingbuilder
1个回答
1
投票

最后我解决了这个问题

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



    panel(layout: new FlowLayout()) {


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


      }
© www.soinside.com 2019 - 2024. All rights reserved.