How do I do the visual part of making a java application?

I have netbeans, and I know the basics of java, although not that much, anyway I have to make a basic space invaders game! Where do I start with objects and stuff?

Thanks in advance


Hi the visual part of any application is called a GUI (graphical user interface) with Java this can be done with a toolkit called swing. There is a good tutorial for learning Java and swing at the main oracle website.


Tutorial Home:

Also if you are new to Java I wouldn't reccomend trying a space invaders game but try creating some simple applications, simple calculator, guess the number game or even tic tac toe (nouts and crosses)

Good Luck.


I'd like to start by suggesting you start with another game because space invaders would be fun to code but you may get upset with the required images, timer events, hit detection, and so on. But if you're confident then go ahead.

There are a few packages to use for visual elements in java: java.awt, javax.swing or java.applet (usually in websites) By basic knowledge I assume you know how to use the API and if not then you'll have some problems.

For space invaders I'd suggest javax.swing package because the objects are easily customizable (good for having images) and layouts are easy to set up. Read up on some good tutorials for swing package.

If you think you need some help, email omg.bloit_it_al(yahoodotcom)