简体   繁体   中英

Buttons and textfields randomly appear on applet - java

I need to make a game as a assignment, but these textfields and buttons seem to randomly appear on top and bottom. This happends from start. I've checked already if all buttons and textfields are positioned right. Does anyone have a idea what could be causing this?

For any deeper look intro the code: Github Repo

见上和下

Thanks in advance! :-)

This was not an issue. I simply have forgotten to use super on paintComponent ( i was thinking something was wrong with the actual buttons and textfields, or the order of them ).

super.paintComponent(g) solved the issue. How clumsy of me.

Thank you for all helpful responses! Especially @MadProgrammer :)

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