How do I port a Java Desktop Application to Netbeans 7.1

后端 未结 1 1503
心在旅途
心在旅途 2021-01-22 01:09

In Netbeans 6, I wrote a fairly complex application based on the java desktop application (org.jdesktop.application. SingleFrameApplication).

The Swing Application Fram

1条回答
  •  孤街浪徒
    2021-01-22 01:44

    Unfortunately the Swing Application Framework was deprecated and removed. It never became a final JSR, and at this point is fully dead (since JavaFX is considered the future of Java UIs).

    To make your app run, copy the swing app jars from an older copy of NetBeans (they may have been inserted into your app's lib directory as well). You should still be able to run with this jar.

    To make further changes to the actual forms you basically have just two options: completely recreate them with the standard form builder or edit them as code instead of visually. You can throw away the .form files, since they are useless now. Instead you can modify the generated code inside the form's java class. It's still rather ugly code, but at least it will be editable now. You may need to remove the magic comments that NetBeans uses to mark blocks of code as uneditable.

    0 讨论(0)
提交回复
热议问题