Results 1 to 3 of 3
  1. #1
    MaN-GreaSe's Avatar
    MaN-GreaSe is offline Member
    Join Date
    Apr 2010
    Posts
    11
    Rep Power
    0

    Default addcomponenet error.

    Java Code:
         .addGroup(layout.createSequentialGroup()
    			    .addComponent(jLabel3, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 55, Short.MAX_VALUE)
                                .addComponent(jLabel2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jLabel1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 55, Short.MAX_VALUE))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    					.addComponent(accountNumberField, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 175, Short.MAX_VALUE)
                                .addComponent(surnameField, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 175, Short.MAX_VALUE)
                                .addComponent(firstNameField, javax.swing.GroupLayout.DEFAULT_SIZE, 175, Short.MAX_VALUE))))
    
                    .addContainerGap());
    Why is there an error on the first addcomponent(jlabel3...
    but the others that follow don't have an error?

    This is the error i get
    Java Code:
    cannot find symbol
    symbol  : method addComponent(javax.swing.JLabel,javax.swing.GroupLayout.Alignment,int,int,short)
    location: class javax.swing.GroupLayout.SequentialGroup
                                .addComponent(jLabel3, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 80, Short.MAX_VALUE)
                                ^

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    Have you tried to manually change the grouplayout-using code? Have you deleted the declaration of any variables (in particular jLabel3)? Myself, I try to use the other more user-friendly layouts and avoid using NetBeans-generated code. YMMV. Much luck!

  3. #3
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

Similar Threads

  1. Replies: 1
    Last Post: 03-10-2010, 02:53 PM
  2. Replies: 1
    Last Post: 12-05-2009, 08:28 AM
  3. Replies: 1
    Last Post: 10-26-2009, 05:38 PM
  4. Replies: 3
    Last Post: 01-23-2009, 09:53 AM
  5. error 530 error authentication required
    By rgale in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 05-12-2008, 05:28 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •