简体   繁体   中英

Painting on JPanel

I got 4 panels in a Frame.

North, East, Center and South.

How can I paint on just 1 specific JPanel inside a Frame?

I tried painting but it seems that I am painting in the JFrame

Try to create new panel and put it in the center, then override its paintComponent method. see Custom Painting and also here

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM