开发者

Is there SQL-syntax aware Swing component?

开发者 https://www.devze.com 2023-01-17 02:20 出处:网络
I am looking for some Java Swing component (textarea like) which is aware of SQL syntax - meaning it recognizes and highlights it.

I am looking for some Java Swing component (textarea like) which is aware of SQL syntax - meaning it recognizes and highlights it.

If there isn't I will need to do it开发者_StackOverflow社区 myself, any useful advices there how not waste too much of time (eg. which component to use) ?


JSyntaxPane appears to support SQL highlighting (I have not tried it myself).


I have used Ostermiller's Syntax Highlighter before. It is as simple as:

HighlightedDocument document = new HighlightedDocument();
JTextPane textPane = new JTextPane(document);


You could have a look at SQuirreL SQL. After a quick look at the source code I think it uses Swing and it has an SQL editor with syntax highlight and even content assist.


The MIT-licensed jEdit syntax package supports SQL and many other languages.

I've use the commercial JIDE Code Editor, which uses jEdit and works very well.

0

精彩评论

暂无评论...
验证码 换一张
取 消