Jump to content

Adding Items to GUI


Recommended Posts

Posted

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();

}

}

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...