java swing resize ImageIcon according to jLabel

前端 未结 2 1146
忘了有多久
忘了有多久 2020-12-11 08:23

i am a new programmer here and i have something to ask, i have browse a picture into my GUI (and set the path in text box also)which displays on a Label, but the label dimen

2条回答
  •  抹茶落季
    2020-12-11 08:47

    You should cut out the call to label.setSize. You should also place all your components in in the form designer instead of producing them when you click the button. Maybe you could also add a layout manager in the bargain? This will really involve a revolt against NetBeans.

提交回复
热议问题