Java: Load image from file, edit and add to JPanel

前端 未结 3 1570
陌清茗
陌清茗 2021-01-28 05:40

I want to load an image from my computer into 2D Graphics so that I can edit it afterwards and then I want to add it to JPanel. If you need to see my project I can

3条回答
  •  囚心锁ツ
    2021-01-28 05:59

    please read this tutorials about Icon in Swing and your Image/ImageIcon would by placed to the JLabel, this way eliminated all troubles came from paint/paintComponents ...

提交回复
热议问题