Adding images on Java JFrame - Netbeans

后端 未结 3 1064
-上瘾入骨i
-上瘾入骨i 2021-01-16 06:26

I\'m using NetBeans 7.1 to code in Java. I have already created a JFrame filled with some labels, textbox and buttons. How can I d

3条回答
  •  悲哀的现实
    2021-01-16 06:30

    1. Open the form in NetBeans form editor.
    2. Add a JLabel from the pallete to the form
    3. Select the label you just added and click the "..." button next to the icon property
    4. Fill out the properties.

    It's normally best that the images reside within the project folder, makes deployment easier in the long run.

提交回复
热议问题