Context
In my next Java class we were given the challenge of making a functional Java based GUI application that could run in a browser. The biggest challenge -- the security issues associated with the Java language and browsers.
Goals
- ● Create an interactive 'online' shopping cart.
- ● List store inventory in a panel and dynamically update availability.
- ● Create GUI components to add, remove, and look up specific details of items.
- ● Implement controls for when an item is out of stock
- ● Implement store inventory and product-specific attributes via an XML file
- ● Have attributes unique to each 'class' of product. The three classes are Music, Videos, and Books.
Execution
The goals above were achieved by instanting GUI components already available in the Java libraries. Event listeners were set up to monitor user interaction with the GUI and called upon other functions defined in the source code. Paring the XML was not
a difficult task but required some logic to be able to grab the data in between the beginning and end XML tags. To implement the product classes, concepts such as inheritance, encapsulation, and polymorphism were utilzied.
This project was fun but the constraints associated with Java web based applications can be tricky as most modern browsers take precautions to ensure Java applications do not pose a security threat. In short, if you want to view this project
just click the button below, but be warned you will need to open up the Java console and make an exception. Additionally, you will need the JRE Plugin installed to run java in your browser. Fingers crossed.
View on Google Drive
View Documentation