Type mismatch: cannot convert from Inventory to JPanel

make sure that Inventory extends JPanel
this makes Inventory to behave as a subclass of a JPanel, and thus you can use it in the same way.

Browse More Popular Posts

Leave a Comment