MillGrantz Posted March 9, 2023 Share Posted March 9, 2023 What I'm trying to do is add the items in my inventory to my gui. Should I add extends JFrame and Script to get the active items into the enum InventoryItems Item[] itemsInventory = getInventory().getItems(); here's my GUI class public class Gui extends JFrame { enum InventoryItems { item1, item2, item3; @Override public String toString() { return name().toLowerCase(); } } Quote Link to comment Share on other sites More sharing options...
Chris Posted March 10, 2023 Share Posted March 10, 2023 https://www.geeksforgeeks.org/java-swing-jlist-with-examples/ 1 Quote Link to comment Share on other sites More sharing options...
MillGrantz Posted March 10, 2023 Author Share Posted March 10, 2023 The issue with that is that the main gui doesn't extend from Script since it can't have 2 imports to get the inventory directly to the gui. Quote Link to comment Share on other sites More sharing options...