I'm using Java and I have been always looking for ways to make my program and upload it online but I don't know how to put my code in a graphical user interface. I want to pac开发者_运维技巧kage it all together so that users can just click on an icon to run it without having to compile.
How do I create graphical user interfaces for Java programs and distribute those programs online?
Learn Java Swing http://download.oracle.com/javase/tutorial/uiswing/
Learn about Java Webstart http://www.java.com/en/download/faq/java_webstart.xml
Use Netbeans for creating your GUI (or another IDE) http://netbeans.org/kb/articles/javase-deploy.html
It depends as there are several ways to create GUIs in Java.
- Desktop GUI (e.g. Swing, AWT)
- Web GUI (e.g. JSF / JSP)
- Mobile GUI (e.g. Android, Java ME)
The jar file alone can be distributed. If you mean creating an exe out of a jar, take a look at Jar2Exe
精彩评论