Try updating the VendingMachineGUI class with this:
import java.awt.Color;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import...
Type: Posts; User: JavaPF
Try updating the VendingMachineGUI class with this:
import java.awt.Color;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import...
OK I have a version of this saved now that will compile.
I can see your GUI... What are you expecting to happen exactly? Please tell me how you would like the program to work.
Is this your entire code? There are a few errors in the VendingMachineGUI class which are stopping me from compiling it.
Hello AZBOY2000 and welcome to the Java Programming Forums :D
Its good to meet you too.
Here is an example of how to create a Swing GUI with a botton. When the button is clicked, an action is...