Maicha / lanterna

Automatically exported from code.google.com/p/lanterna
GNU Lesser General Public License v3.0
0 stars 0 forks source link

No terminal appears at all after changing to 3.0.0-alpha4 API. #124

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I do not know if the issue is on my side, but what I had running in 2.1.9, 
won't run in 3.0.0-alpha4 even after I converted to the newest API. Is 
3.0.0-alpha4 usable or is it intended just for progress tracking?

This my attempt to open a terminal:

ScrollingSwingTerminal terminal = new ScrollingSwingTerminal();
TerminalSize terminalSize = terminal.getTerminalSize();

terminal.enterPrivateMode();
terminal.setCursorVisible(false);

mainMenu(terminal, difficulty); // Executes mainMenu. //

// Reads the auto-generated map. //
ArrayList<Position> Matrix = new ArrayList<Position>();
Matrix = Obstacles.Obstacles(terminalSize, difficulty);

// TODO:
for (Position i : Matrix) {
    terminal.setCursorPosition(i.col, i.row);
    terminal.putCharacter('#');
}

Original issue reported on code.google.com by rednic.d...@gmail.com on 14 Jan 2015 at 12:28

GoogleCodeExporter commented 9 years ago
I forgot to mention, I am not getting any errors. It simply does not show. The 
terminal window won't pop up as it used to; I am using Eclipse Standard [LUNA].

Original comment by rednic.d...@gmail.com on 14 Jan 2015 at 4:45

GoogleCodeExporter commented 9 years ago
Lanterna 3's Terminal and Screen layer should be ready for use, it's the GUI 
system that is still non-functional. The problem you are experiencing above is 
probably because SwingTerminal (and ScrollingSwingTerminal) in Lanterna 3 is a 
JComponent and not a JFrame. This means it requires a Swing container to add it 
to, or you can use SwingTerminalFrame if you want something that behaves like 
SwingTerminal used to behave. Note that even SwingTerminalFrame won't open just 
by calling enterPrivateMode(), you'll have to use setVisible like with normal 
Swing JFrames.
See if that works.

Original comment by mab...@gmail.com on 18 Jan 2015 at 11:11