Board index » jbuilder » 2005 sp4 GUI Designer Issue
CaptnTony
JBuilder Developer |
2005 sp4 GUI Designer Issue2005-06-09 11:15:01 PM jbuilder20 I have two issues with the designer in this example. The Wizard and CustomerAccount classes both cause errors to be generated by the 'live preview' designer. The one generated by Wizard wizParent = null is just a pain in the backside while the one generated by CustomerAccount ca = null is critical (and something I haven't seen in the designer yet). CustomerAccount implements a class that is used to compare values between an 'original' copy and a 'modified' copy. Since I've added that implements statement, I did not get an error before modifying the class to implement objectaudit.isAuditable, I get the following errors in designer: - java.lang.NoClassDefFoundError: objectaudit/Auditable - Failed to create live visual subcomponent wizParent as Wizard wizParent = null;. Creating a red component in its place With this configuration in place, the panel is drawn correctly but I cannot select anything except for 'this' - none of the individual components are selectable. If I comment out the CustomerAccount ca = null line, everything is 'back to normal', but obviously my other methods are not going to have access to the account information needed. Also, when the line is not commented out, the Structure list only shows 'this' and 'wizParent' - no other objects. Of course, if I run this program I get no errors like the java.lang.NoClassDefFoundError: objectaudit/Auditable. Any ideas are appreciated. ------------------------ code sample ------------------------------------ public class ContractInformation extends WizardFrame { Wizard wizParent = null; CustomerAccount ca = null; <---- Causes the error (Can't use if(Beans.isDesignTime()) here JTextPane txtHeader = new JTextPane(); JTextField txtBeginDate = new JTextField(); JLabel lblBeginDate = new JLabel(); JSpinner spinTerm = new JSpinner(); JLabel lblTerm = new JLabel(); JLabel lblMonths = new JLabel(); public ContractInformation(Wizard wiz) { try { jbInit(); wizParent = wiz; } catch (Exception e) { e.printStackTrace(); } } private void jbInit() throws Exception { this.setPreferredSize(new Dimension(780, 550)); this.setFont(new java.awt.Font("Arial", Font.PLAIN, 12)); this.setLayout(null); txtHeader.setBackground(SystemColor.control); txtHeader.setFont(new java.awt.Font("Arial", Font.BOLD, 16)); txtHeader.setForeground(Color.blue); txtHeader.setText("Please specify contract information."); txtHeader.setBounds(new Rectangle(2, 6, 774, 97)); txtBeginDate.setFont(new java.awt.Font("Arial", Font.PLAIN, 12)); txtBeginDate.setHorizontalAlignment(SwingConstants.CENTER); txtBeginDate.setBounds(new Rectangle(186, 184, 100, 22)); lblBeginDate.setFont(new java.awt.Font("Arial", Font.PLAIN, 12)); lblBeginDate.setHorizontalAlignment(SwingConstants.RIGHT); lblBeginDate.setText("Desired Begin Date:"); lblBeginDate.setBounds(new Rectangle(54, 184, 130, 21)); spinTerm.setBounds(new Rectangle(186, 215, 50, 22)); spinTerm.setFont(new java.awt.Font("Arial", Font.PLAIN, 12)); lblTerm.setFont(new java.awt.Font("Arial", Font.PLAIN, 12)); lblTerm.setHorizontalAlignment(SwingConstants.RIGHT); lblTerm.setText("Term:"); lblTerm.setBounds(new Rectangle(132, 216, 52, 21)); lblMonths.setFont(new java.awt.Font("Arial", Font.PLAIN, 12)); lblMonths.setHorizontalAlignment(SwingConstants.LEFT); lblMonths.setText("months"); lblMonths.setBounds(new Rectangle(240, 216, 49, 21)); this.add(txtHeader); this.add(txtBeginDate); this.add(lblBeginDate); this.add(spinTerm); this.add(lblTerm); this.add(lblMonths); } ----------------------------------------- end code sample -------------------------------------- -- Todd Frahm Manager - Software Engineering Digital Telecommunications Inc --------------------------------------------------- Only one can be first! |