Can I create forms in Java using notepad? The only way I know is to use Eclipse IDE and its called SWT. Is there any other import available specifically in Java and not in Eclipse?
Welcome to the Java Programming Forums
The professional, friendly Java community. 21,500 members and growing!
The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.
>> REGISTER NOW TO START POSTING
Members have full access to the forums. Advertisements are removed for registered users.
Can I create forms in Java using notepad? The only way I know is to use Eclipse IDE and its called SWT. Is there any other import available specifically in Java and not in Eclipse?
Yes you can, using the the same code as used in Eclipse. There may be some growing pains to get your environment set up, so start small with simple tutorials and work up from there.
When I tried creating a form on Eclipse, the import was org.eclipse.swt.widgets.*. I don't know if that will work when hand coded. I researched on Google saying I need to use awt. Other sites says I need to use swing. I'm confused on what is the basics on creating a GUI.
AWT was the first GUI framework bundled with the Java SE (Standard Edition) framework. AWT is very limited and actually not much used. Swing was the second GUI framework introduced in Java SE and it's more sophisticated, more components, look&feels support, easy customizations, etc...
SWT is not part of Java SE. SWT comes from the Eclipse Foundation. It uses a native library to access the native GUI libraries of the operating system.
Since you would like to start with GUI development: start with Swing.
The Oracle official tutorial is: Trail: Creating a GUI With JFC/Swing
Andrea, www.andbin.net — SCJP 5 (91%) – SCWCD 5 (94%)
Useful links for Java beginners – My new project Java Examples on Google Code
You asked if you could use SWT using Notepad. The answer is, "Yes, you can." As I suggested, you should find a basic SWT tutorial that includes instructions on how to get your environment set up correctly. What the tutorial should tell you is to download swt.jar and add that to your jar files on the CLASSPATH.
If your question is really whether you should use AWT, SWT, or Swing (or JavaFX) to create GUI applications in Java, then the answer to that that is a personal choice just as using Notepad or Netbeans instead of Eclipse is a personal choice. Try all 3 toolkits and see which you prefer, but don't expect or even allow someone or Google to make the personal choice for you.
@andbin Thank you very much! It was a very neat explanation. Now I understand the difference and uses of these three. I'll try your suggestion in starting out with swing.
@GregBrannon Sorry my question is very misleading. Now I know its a personal choice which to use with these three. I'll also try these three after I'm done studying with the swing framework so I'll get an idea on which is the best to use. Thanks!