简体   繁体   English

Eclipse Windows应用程序-入门

[英]Eclipse Windows App - Getting Started

I have to questions in this post. 我必须在这篇文章中提问。 The first one - I can't seem to figure out how build a windows GUI application in Eclipse IDE with Java. 第一个-我似乎无法弄清楚如何使用Java在Eclipse IDE中构建Windows GUI应用程序。 I successfully used Eclipse to make a Java Android app after downloading the Android SDK into Eclipse. 将Android SDK下载到Eclipse之后,我成功地使用Eclipse制作了Java Android应用程序。 I want to generate the same app, but now this time for Windows. 我想生成相同的应用程序,但是现在是Windows。

It seems there is no GUI tool in Eclipse for Windows? 看来Windows的Eclipse中没有GUI工具? Do I need to download additional add-ins for Windows GUI? 我需要为Windows GUI下载其他加载项吗? I thought the GUI tool/widgets used for Android would be the same but this doesn't appear to be the case. 我认为用于Android的GUI工具/小部件将是相同的,但事实并非如此。 I see references to Swing, SWT, WindowBuilder... can someone help me sort out which software needs to be loaded into Eclipse to support Windows GUI development? 我看到了对Swing,SWT,WindowBuilder的引用……有人可以帮助我确定需要将哪些软件加载到Eclipse中以支持Windows GUI开发吗?

The 2nd question is how can I take my Java/xml Android App (developed in Eclipse) and compile that code to run on Windows? 第二个问题是如何使用Java / xml Android App(在Eclipse中开发)并编译该代码以在Windows上运行? I assume I will need to create a comparable GUI in the Windows editor (see first question), and then copy the java code into it? 我假设我需要在Windows编辑器中创建一个可比较的GUI(请参阅第一个问题),然后将Java代码复制到其中?

Thanks! 谢谢!

Sounds like you come from a .NET environment. 听起来您来自.NET环境。 :P :P

You don't have an easy drag and drop, so to make the Java GUI you'd use SWING: https://docs.oracle.com/javase/tutorial/uiswing/ 您没有轻松的拖放操作,因此要使用Java SWING, 使用SWING: https : //docs.oracle.com/javase/tutorial/uiswing/

Furthermore, if you have created your android application according to the MVC pattern, you can easily reuse all the logic and just hook up a new controller + view. 此外,如果您已根据MVC模式创建了android应用程序,则可以轻松地重用所有逻辑,只需挂接一个新的controller +视图即可。 http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller

That's one of the powerfull features of the MVC pattern, makes your model logic really portable. 这是MVC模式的强大功能之一,使您的模型逻辑真正可移植。

Anyway, I hope that helps you along :) 无论如何,希望对您有所帮助:)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM