It is a small Slot Machine Project, only with educational porpouses. NOTE: If you like it, and see thing to improve the code let me know!
The SlotMachine project is a slot machine game that utilizes the JFrame, JDialog, JButton, and JLabel classes from the Java Swing UI library. The main class, SlotMachine, contains all the logic of the game including the creation of the window, initialization of the buttons, cells, and dialogs. The Cell class is a helper class that represents each cell of the slot machine and has a randomImage method to assign a random image. The JDialog class is used to create modal dialog windows for the "over" and "premios" dialogs. The ActionListener interface is used to detect actions performed by the user such as button clicks. The Jugar, Dado and Contador classes extends the Thread class and are used for the game logic, simulating the roll of a die, and displaying the winnings/credits counter on the screen. The Explosion class also extends the Thread class and is used to create an explosion animation in the winning cells.