IIRC swing-layout was a separate library required in the early days of the Netbeans free form GUI editor. Eventually, Java included the code in the standard jdk. Although it did the same thing, it did it in a slightly different and not fully compatible way. I'm not certain but I think I had to just rebuild any of the old forms under the jdk version.

Bayless



On 10/23/19 11:46 AM, Peter Toye wrote:
Re: GUI builder cannot find generated code Dear Paul,

You can probably delete the swing library - the original program used it.

The project platform is JDK12 which is what I've got installed. You can probably downgrade it to 11 without problems, as I don 't use any Java features that aren't in version 8.

How is one to send an entire project without zipping? I'm on Windows and don't have tar.

Best regards,

Peter
mailto:netbe...@ptoye.com
www.ptoye.com

-------------------------
Wednesday, October 23, 2019, 4:57:18 PM, you wrote:


        I just did that and two issues popped up right away:
Problem: The project uses a class library called "swing-layout", but this class library was not found. Solution: Click Resolve to open the Library Manager and create a new class library called "swing-layout". The active project platform is an older version than it's required by project source/binary format.
I'm using NetBeans 11.1 with AdoptOpen JDK 11
So I don't even get as far as you.
FYI: I'm pretty sure Geertjan said no zips please.
---

Cheers,

Slim

On 2019-10-23 11:32, Peter Toye wrote:

        Dear Geertjan,

I'm not sure what you mean by a "Stack trace" - there's no dump available as it didn't crash..

Here's as small an example as I can manage.

Steps to reproduce:

 1. Open TestFormBug in NB 11.1 (I'm on Windows - don't know if the OS
    is relevant).
 2. If not already open, in package com.ptoye.testFormBug, open
    OuterPane.Java.
 3. Click on "Design" tab
 4. You should get an error message saying the file is corrupt. If you
    don't, your system is different from mine.




Best regards,

Peter
mailto:netbe...@ptoye.com
www.ptoye.com

-------------------------
Wednesday, October 23, 2019, 3:33:49 PM, you wrote:

        Unless we can reproduce it or get a stack trace, you’ll get no 
responses.

Gj

On Wed, 23 Oct 2019 at 16:09, Peter Toye <netbe...@ptoye.com <mailto:netbe...@ptoye.com>> wrote: More information on this. When I open the .java file in a text editor, the editor-fold lines have extra information

// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
and
  } // </editor-fold>//GEN-END:initComponents

But these don't appear when I look at the file in NetBeans. I've done the same for a very simple project which I started from scratch and the same happens.

Is the editor performing some sort of censorship on auto-generated comments? It doesn't make looking for problems any easier. Or is it a bug, in which case I'll report it?

But I still can't develop my project until I can sort this. I'm attaching the error that I get in case it helps.

Does anyone know exactly what the GUI editor is looking for, so that I can edit the file to satisfy it? Various attempts by me to try that have all failed.

-------------------------

Tuesday, October 22, 2019, 11:55:09 AM, you wrote:

        Another issue moving from NB 8 to 11.1

I moved a Java with Ant project from NB version 8 to 11.1, and everything seemed fine until I decided to modify a form within the project. I got an error message saying that the GUI builder couldn't find the generated code. The message directed me to the wiki page http://wiki.netbeans.org/FormGuardedBlockError which describes the issue, but the generated code sections of my project seem OK - I reproduce them below. These are identical to code generated on a new project which of course doesn't give the error.

  // <editor-fold defaultstate="collapsed" desc="Generated Code">
  private void initComponents() {
...
    add(pnlButtons, java.awt.BorderLayout.NORTH);
??  } // </editor-fold>

  // Variables declaration - do not modify
  private javax.swing.ButtonGroup bgColours;
...
  private javax.swing.JRadioButton rbtTemp;
  // End of variables declaration
??

Any ideas on how I can recover from this, as the code looks fine?


Regards,

Peter
mailto:netbe...@ptoye.com
www.ptoye.com <http://www.ptoye.com>



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org <mailto:users-unsubscr...@netbeans.apache.org> For additional commands, e-mail: users-h...@netbeans.apache.org <mailto:users-h...@netbeans.apache.org>

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to