Re: help editing the Netbeans generated code: jPanel.add();

Wade Chandler <[email protected]> Wed, 23 Jul 2008 14:24:19 -0700 (PDT)
Newsgroups gmane.comp.java.netbeans.user-interface
Message-ID <[email protected]>
NB doesn't support just using any layout directly in the UI editor. You would have to write and add a module to get layout support in there for another layout. This is just a direct link to the fact that layout uses loosely coupled layout information. For instance, in the case of "west" "east" etc....that String could really be any value, so the IDE can't really infer anything.

Wade

 ==================
Wade Chandler, CCE
Software Engineer and Developer, Certified Forensic Computer Examiner, NetBeans Dream Team Member, and NetBeans Board Member
http://www.certified-computer-examiner.com
http://wiki.netbeans.org/wiki/view/NetBeansDreamTeam
http://www.netbeans.org



----- Original Message ----
> From: palmisano <[email protected]>
> To: [email protected]
> Sent: Wednesday, July 23, 2008 12:25:28 PM
> Subject: [nbui] help editing the Netbeans generated code:  jPanel.add();
> 
> 
> I'm new to Netbeans and I'm sure this functionality exists, I just don't know
> what properties to select...
> 
> I'm using the MigLayout and cannot figure out how to get the .add(Component)
> to pass additional parameters in the generated code. 
> 
> Netbeans Generated Code: jPanel4.add(jButton1);
> 
> Desired Code: panel.add(comp3, "wrap");
> 
> There are custom code options for "pre-adding" and "post-adding" however
> that puts code in the lines above/below the .add(component) line.  
> I then tried:
> Right clicking on Component in the Object Browser
> Selecting Customize Code (edit only edited text on the component)
> 
> I could only edit: 
> jPanel4 = new javax.swing.JPanel();
> jRadioButton1.setText("jRadioButton1");
> 
> but not: 
> jPanel4.add(jButton1); 
> 
> XXX.add(...) can take one - several parameters, how control them in
> Netbeans? I am finding the Netbeans support documentation to be extremely
> difficult to search and google usually turns up better results. 
> 
> Any suggestions other then editing outside of Netbeans?? 
> -- 
> View this message in context: 
> http://www.nabble.com/help-editing-the-Netbeans-generated-code%3A--jPanel.add%28%29--tp18614838p18614838.html
> Sent from the Netbeans - UI mailing list archive at Nabble.com.