How to center JFrame produced Lanterna, on the screen in Java?

140 views Asked by At

I want the JFrame that is produced by Lanterna, to be centered on the screen, instead of being in the top-left corner.

        DefaultTerminalFactory defaultTerminalFactory = new DefaultTerminalFactory();
        defaultTerminalFactory.setInitialTerminalSize(new TerminalSize(STARTING_TERMINAL_COLUMNS, STARTING_TERMINAL_ROWS));
        defaultTerminalFactory.setTerminalEmulatorTitle("Title");
        term = defaultTerminalFactory.createTerminal();
        screen = new TerminalScreen(term);
0

There are 0 answers