drawing text within a JPanel

前端 未结 4 1216
生来不讨喜
生来不讨喜 2021-01-05 16:04

I\'m looking for the most basic description of how to draw text within a JPanel. I know there are a billion tutorials out there but none of them are clicking with me and I h

4条回答
  •  孤城傲影
    2021-01-05 16:43

    Add a JLabel to the JPanel.

    Call setText(String) on the JLabel and your text will be drawn within the JPanel.

提交回复
热议问题