Re: Form inheritance in NetBeans

Ales Kahanek <[email protected]> Fri, 30 May 2008 10:36:34 -0700 (PDT)
Newsgroups gmane.comp.java.netbeans.user-interface
Message-ID <[email protected]>
>> and this worked correctly when I ran the application

I would expect that, as the controls are created by the constructor and the
*.form file is needed only for the designer

>> but the Netbeans designer did not display the form correctly

... and that is the core of the problem IMHO

I will try your workaround, thanks for the hint.



Phil Doble wrote:
> 
> I tried creating a "Base" frame class and then using ...extends BaseFrame
> instead of ...extends javax.swing.JFrame, and this worked correctly when I
> ran the application, but the Netbeans designer did not display the form
> correctly. So forms inheritance works in Java, but not in the Netbeans
> designer.
> 
> The way around this is to create a "JPanel form" comnponent for the
> contents of the frame, and to put this on the various JFrames that you
> want (create the "JPanel form" comnponent, compile the project, then drag
> from the explorer onto the design surface).
> 
> 

-- 
View this message in context: http://www.nabble.com/Form-inheritance-in-NetBeans-tp17544648p17564431.html
Sent from the Netbeans - UI mailing list archive at Nabble.com.