使用 Eclipse Window Builder 创建 SWING 应用程序

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/8624163/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 17:30:10  来源:igfitidea点击:

Creating a SWING app with Eclipse Window Builder

eclipseswingwindowbuilder

提问by Cemre

I am using Eclipse Indigo on Mac. I just set up the Window Builder tool however for some reason I can not create a new project with it. I select the Swing Designer -> Application Window option another window pops up and asks me for the source folder, project name etc. but when I try to type a name in the source folder it says file cannot be found and when I try to browse there is nothing to select. Does anyone have an idea about whats going on ? thanks

我在 Mac 上使用 Eclipse Indigo。我刚刚设置了 Window Builder 工具,但是由于某种原因我无法用它创建一个新项目。我选择了 Swing Designer -> Application Window 选项,另一个窗口弹出并询问我源文件夹、项目名称等,但是当我尝试在源文件夹中键入名称时,它说找不到文件,当我尝试浏览时没有什么可以选择的。有没有人知道发生了什么?谢谢

回答by aleroot

You have to create a Java project then you have to create a source folder and a package, after doing that you can select the created package on the Package explorer and create a new Application Window or JFrame from WindowBuilder menu.

您必须创建一个 Java 项目,然后您必须创建一个源文件夹和一个包,然后您可以在包资源管理器中选择创建的包并从 WindowBuilder 菜单创建一个新的应用程序窗口或 JFrame。

回答by raphaeljuwe

This is the snapshots of my environment. On the eclipse IDE Right click on the package, Open ---File---New---Other---Then type Jframe. Click on Next and complete the wizard.

这是我的环境的快照。在eclipse IDE上右键包,打开---File---New---Other---然后输入Jframe。单击下一步并完成向导。

Underneath the capture you can switch between the source code and design view

在捕获下方,您可以在源代码和设计视图之间切换

snapshots of my environment

我的环境快照

snapshots of my environment

我的环境快照