Paint background of JPanel

前端 未结 5 687
盖世英雄少女心
盖世英雄少女心 2021-01-19 05:16

How can I tell the paint method to draw background on JPanel only and not on the entire JFrame. My JFrame size is bigger than the JPanel. When I try to paint a grid backgrou

5条回答
  •  南方客
    南方客 (楼主)
    2021-01-19 05:37

    super.paintComponents(g);
    

    I would suggest as your first point of investigation.

提交回复
热议问题