private void itemDescription(JPanel jp1, String prodId) {
JLabel bodyLabel = new JLabel("<html>" + storeManager.getInv().getProd(prodId).getProdName() + "<br/><html>" +
storeManager.getInv().getProd(prodId).getProdId() + "<br/><html>$" + storeManager.getInv().getProd(prodId).getProdPrice() +
"<br/><html>" + "Stock Available: " + storeManager.getInv().getStockAmount(prodId) + "</html>");
jp1.add(bodyLabel);
}
Hello! So i have a gui and what i am trying to accomplish is that after i click the add to cart button, the stock available in the item description needs to be reduced. I am unsure of how to get it to update dynamically based on the stock that is available in the inventory.