简体   繁体   中英

Updating the GUI of a Java Applet

I'm writing a Java applet in Eclipse. When I click on the button in the applet, it should display a message, but the message won't actually show up until I fiddle with the applet window, like resizing the window. Is there something I should add in my code, so the GUI automatically updates once I click the button?

generally a call to repaint() will take care of that.


based on mre's comments, this has better information: Java Swing revalidate() vs repaint()

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