Java Version Issue

Hi,

I am working on a project and have been using JDK 6.0 for about two weeks now. I just recently found out that I was supposed to be using JDK 5.0. So I uninstalled 6.0 and installed the 5.0 version just fine, but now I re-open my project and get about 3 or 4 of these build errors on every form/dialog that I have created:

E:\Documents and Settings\Games\My Documents\School\CIT 295\Project\NetBeans Output\Sales System\src\dlgError.java:54: cannot find symbol

symbol :class GroupLayout

location:package javax.swing

javax.swing.GroupLayout layout =new javax.swing.GroupLayout(getContentPane());

Also, this code is located in the uneditable area of the code. Any ideas?

Message was edited by:

bcwolfe

[861 byte] By [bcwolfea] at [2007-11-27 1:03:22]
# 1
I'm no expert in layouts, but I'd say that layout is not available until Java 6, rewrite using a layout available in 5.
morgalra at 2007-7-11 23:38:26 > top of Java-index,Java Essentials,Java Programming...
# 2

>

> Also, this code is located in the uneditable area of

> the code. Any ideas?

Only one of the following is correct

1. That statement is wrong. The code can in fact be edited.

2. The code must run in 6.0. Whoever told you otherwise is wrong.

3. You shouldn't be using the code that you are using at all.

jschella at 2007-7-11 23:38:26 > top of Java-index,Java Essentials,Java Programming...
# 3

I'm guessing you are using NetBeans? I'm having the same issue. And yes, the code is uneditable (within the NetBeans framework). It automatically places it in the "generated code" section. For some reason the GroupLayout isn't recognized, even thought the swing library has been added. All the other swing classes are there (but for me LayoutStyle doesn't compile either).

kevronea at 2007-7-11 23:38:26 > top of Java-index,Java Essentials,Java Programming...
# 4
This website cleared things up for me: http://www.techienuggets.com/Comments?tx=5839If you are using NetBeans 5.5 it should help you as well.
kevronea at 2007-7-11 23:38:26 > top of Java-index,Java Essentials,Java Programming...