Nobby Knox wrote:
> 
> Hi Mario.
> 
> I'm also new to Java and Netbeans, but I have experienced the same
> problem you mentioned here. Let me explain.
> 
> Netbeans (I'm using NetbeansX2) creates your application/applets in
> "packages". Have a look at the top of your code. Do you see the line
> "package <some name>"? If so, that's your problem.
> 
> To solve this is very, very simple. Either remove the "package" line
> from all your code (not always desirable), or you can just move one
> directory up and compile prefixing the package name to your .java file.
> Here is an example:
> 
> This causes an error:
> 
> javac teste.java
> 
> To solve (with package <package name> - look at the top of your code):
> 
> cd ..
> javac <package name>.teste.java
> 
> That should do it. If this doesn't help, let me know what is going wrong
> and I try to help again. Remember that you need to take the same
> approach when running your applications.

        I'm not using Netbeans, i'm just using the swing classes that came with
it.

        The funny part is that i'm importing javax.swing.tree.DefaultTreeModel
so that should work.

        Thanks
-- 
        Mario Filipe 
        [EMAIL PROTECTED]
        http://neptuno.sc.uevora.pt/~mjnf


----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to