Package organisation
Hello,
I'm getting this message...
CountWordWin.java:8: CountWordWin clashes with package of same name
public class CountWordWin extends JFrame {
^
1 error
I assume this means I have to put my class in a package instead of using the default one, how do I do this and how should I name them and organise my files/folder to conform to conventions?
I know it has somthing to do with my home page address www.nickhanlon.co.uk, named something like "package co.uk.nickhanlon.countwordwin;"
Please help, and thank you
Nick Hanlon
[592 byte] By [
nhanlon] at [2007-9-26 2:21:53]

Getting that errors simply means that your package and the class has the same name.
I don't know if you know this, but basically a directory denotes a package and/or subpackage.
so that means if your package is
co.uk.nickhanlan.countwordwin
your directory would be
+-co
+-uk
+-nickhanlan
+-countwordwin
- countWordWin.java
The easiest way is to change your java's file name to something else so it won't clash with the pacakge name. Changing the directory name will do, BUT it might affect other classes that is sharing the same directory.
Remember to change your public class XXX name as well as any default and non-default constructor.
hope it helps.