0

i am working on a project in java (using eclipse) that was developed by other programmers with whom i have no contact. how can i identify which classes are for the gui? there are files that import java.awt but i didn't find any mention of swt.

every time i think i found a gui class, i try to view it with the windowbuilder editor in design mode but get the error message:

This is not a GUI class and can't be edited graphically The parser parsed the compilation unit, but can't identify any GUI toolkit.

can anyone explain this to me? i am new user with eclipse and java.

4

2 回答 2

1

没有很多流行的 Java GUI 框架可用。使用Eclipse 搜索 -> 文件 -> 包含子字符串的文本

   javax.swing
   java.awt
   org.eclipse.swt

每次尝试都会列出三个主​​要已知框架之一的候选类。可能会列出一些其他不相关的类,但它们并不常见,您会很快找到使用了哪些技术。该应用程序还可以混合多个框架(例如,swing+awt)。

这些搜索子串不太可能偶然出现在 java 代码中;即使他们愿意,这也很容易识别。

于 2013-07-03T14:33:40.893 回答
0

这两个包有 GUI 类

java.awt.*
javax.swing.*   
于 2013-07-03T14:28:00.780 回答