[Logo]
Forums Register Login
Changing GUI Components at Runtime
I'm making a GUI for the first time. I have to make a program that simulates an elevator system. I'm trying to resize a button to simulate the height that the elevator is currently at during runtime. The button size nor text will update until the loop is done and it returns. Is there any way to update this during runtime? Also, I'm open to other ideas. Thanks in advance.
> The button size nor text will update until the loop is done and it returns.

no crystal balls here - post your (errant) code.
Read Concurrency in Swing. I'm 99% sure this is the cause of your problem - your loop is executed on the Event Dispatcher Thread (EDT), and therefore all updates to the GUI will wait until the loop is finished.
Wink, wink, nudge, nudge, say no more ... https://richsoil.com/cards



All times above are in ranch (not your local) time.
The current ranch time is
Nov 19, 2017 09:38:25.