HOW TO: CREATE AND RUN JAVA AWT APPLETS IN INTELLIJ IDEA
If you want create a new applet using awt library via IntelliJ IDEA then you will need to take several simple steps.
1. Start IntelliJ IDEA and create new project:
3. Next window leave empty, by default
Press "Next" button
4. Write name you project, and other by default
Press "Finish"
1. Start IntelliJ IDEA and create new project:
Press "Create New Project"
2. Choose "Java" and the rest of the settings can be left as default.
Press "Next" button3. Next window leave empty, by default
Press "Next" button
4. Write name you project, and other by default
Press "Finish"
5. Create a new Java class in your project in "src" folder
enter name for new class
6. Copy/paste code to body of class
import java.applet.*; import java.awt.*; /** * Created by Aleksandr on 14.03.2017. */ public class AppletClass extends Applet{ public void init(){ } public void start(){ } public void stop(){ } public void destroy(){ } public void paint (Graphics g) { } }7.Tell IntelliJ Idea you want to make an applet by right-clicking on the new class you created and selecting "Create 'className'"
"Applet Parameters" section allows you to enter/set up parameters that will be accessible via .getParameter("newParameter");
Press "OK"
9. Now simply hit run/debug and appletviewer.exe will launch your applet in a new window
Next time you may change parameter and other: Run->Edit Configurations...
Комментарии
Отправить комментарий