Here is a code snippet to put a button at an arbitrary position on the screen. Java packages allow a hierarchy of named scopes to be created for the organisation of related collections of java classes. When programming Applets or small applications in Java, it is sufficient to use the default scope for creating classes. The default scope is used when a public class is created in a file without a package declaration. What runs in one environment, may not load in another.
Packages help by standardising the environment.
To use packages is very simple. When compiling, use the -d option to set the root of the classes hierarchy.