What I want to do is add items to an ArrayList then print. Each item needs to either be selectable, or non selectable.
The list needs to be interactable with the arrow keys.
I have the list being printed out, and thats about it. Heres my source, I have no idea what to do next.
import java.util.ArrayList;
import java.util.List;
public class Menu
{
List<String> menuItems = new ArrayList<String>();
public void addItem(String menuItem, boolean selectable)
{
//If the Item is selectable, print ' <' beside the currently selected.
//Else, make it Unselectable (Will not display ' <' beside this, instead skip)
menuItems.add(menuItem);
}
public void printMenu()
{
for(String menuItem : menuItems)
{
System.out.println(menuItem);
}
}
}