public static void main(String[] args) throws Exception
    {
        final SwingTerminal swingTerminal = new SwingTerminal();
        final GUIScreen guiScreen = new GUIScreen(new Screen(swingTerminal));
        guiScreen.getScreen().startScreen();
        final Window window1 = new Window("Palette Switcher");

        Panel mainPanel = new Panel(new Border.Invisible(), Panel.Orientation.VERTICAL);
        ActionListBox actionListBox = new ActionListBox();
        
        Field[] fields = TerminalPalette.class.getFields();
        for(Field field: fields) {
            if(field.getType() != TerminalPalette.class)
                continue;
            
            if((field.getModifiers() & Modifier.STATIC) != 0)
                actionListBox.addAction(new ActionListBoxItem(guiScreen, field));
        }
        
        mainPanel.addComponent(actionListBox);
        window1.addComponent(mainPanel);

        Panel buttonPanel = new Panel(new Border.Invisible(), Panel.Orientation.HORISONTAL);
        Button exitButton = new Button("Exit", new Action() {
                public void doAction()  {
                    guiScreen.closeWindow();
                }
            });
        buttonPanel.addComponent(new EmptySpace(20, 1));
        buttonPanel.addComponent(exitButton);
        window1.addComponent(buttonPanel);
        guiScreen.showWindow(window1, GUIScreen.Position.CENTER);
        guiScreen.getScreen().stopScreen();
    }