Drawing parse tree in ANTLR4 using Java
问题 I am new to ANTLR4, when I was first trying it out in command line I was using the grun with gui parameter. Now I am developing a Java application and I want to display the same dialog while executing my Java program. I generated the ParseTree successfully, and I can navigate through it. But I want to display it as well. I think it has something to do with TreeViewer class but I couldn't figure out how to use it. Thanks 回答1: TreeViewer is a Swing Component so you should be able to add it to