MainFrame.java 文件源码

java
阅读 35 收藏 0 点赞 0 评论 0

项目:CMMParser 作者:
/**
 * 初始化语法错误面板
 */
private void initGrammarErrorPane() {
    grammarErrorPanel = new GrammarErrorPanel(sourceCodeEditorPane);
    grammarErrorPanel.setBackground(LIGHT_GRAY_COLOR);
    grammarErrorScroll = new JScrollPane(grammarErrorPanel);
    grammarErrorScroll.setLocation(GRAMMAR_START_X, GRAMMAR_START_Y);
    grammarErrorScroll.setSize(GRAMMAR_WIDTH, GRAMMAR_HEIGHT);
    this.add(grammarErrorScroll);
    final JScrollBar vBar = grammarErrorScroll.getVerticalScrollBar();
    vBar.setUI(null);
    grammarErrorScroll.setHorizontalScrollBar(null);
    grammarErrorScroll.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED);
    MouseWheelListener[] listeners = grammarErrorScroll.getMouseWheelListeners();
    for (MouseWheelListener l : listeners) {
        grammarErrorScroll.removeMouseWheelListener(l);
    }
    grammarErrorScroll.setBorder(null);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号