how to add a text to a frame i want that text to update when a user adds some product to a cart so it displayes a total price of products added
iframe
Collapse
X
-
Code:JFrame frame = new JFrame("Wozek"); frame.add(new JLabel(new ImageIcon("cart.jpg"))); final JLabel stan_koszyka = new JLabel("Koszyk jest pusty"); frame.add(stan_koszyka); int width = 300; int height = 300; frame.setSize(width, height); frame.setVisible(true);
but it only takes the second label doesnt display the imageComment
Comment