I have written a program to demonstrate my solution to the UnisexBathroom concurrency program.
My GUI has 5 areas, a counter which works fine and counts down the number of males and females waiting to use the bathroom.
An input area for the user to enter how many males and females will initially join the q. This also works fine.
A play and exot button, both working fine...
Now the unusual behaviour...
My GUI contains 2 large pictures, which get set to male/female and NOmale/NOfemale, depending on who's allowed into the bathroom at a certain time. The correct picture is always being displayed, however in the background random pieces of the GUI appear, disappear and reappear, they go away at the end, but it looks terrible while the program is running.
I also have 5 cubicle icons which change to men or women depending on who currently occupies them. The same behaviour is occuring here.
If anyone has many ideas why this is happening or a solution Id be most grateful. Ive heard people talk about image loading but I dont really know anything about this, should I preload all the images at the start? At the moment, they get loaded as they are needed. I dont know if this is the problem though as the correct images are appearing, its the random junk behind them Im worried about.
Thanks, Conor
My GUI has 5 areas, a counter which works fine and counts down the number of males and females waiting to use the bathroom.
An input area for the user to enter how many males and females will initially join the q. This also works fine.
A play and exot button, both working fine...
Now the unusual behaviour...
My GUI contains 2 large pictures, which get set to male/female and NOmale/NOfemale, depending on who's allowed into the bathroom at a certain time. The correct picture is always being displayed, however in the background random pieces of the GUI appear, disappear and reappear, they go away at the end, but it looks terrible while the program is running.
I also have 5 cubicle icons which change to men or women depending on who currently occupies them. The same behaviour is occuring here.
If anyone has many ideas why this is happening or a solution Id be most grateful. Ive heard people talk about image loading but I dont really know anything about this, should I preload all the images at the start? At the moment, they get loaded as they are needed. I dont know if this is the problem though as the correct images are appearing, its the random junk behind them Im worried about.
Thanks, Conor