Results 1 to 5 of 5
  1. #1
    EarthModder1 is offline Member
    Join Date
    Jan 2014
    Posts
    2
    Rep Power
    0

    Default MigLayout "Getting Started" - More like "throw ya in the water and hope you can swim"

    So..... I go download MigLayout.jar, include it with my Java project, try the "getting started" code, and guess what? The code is wrong.

    Java Code:
    JPanel panel = new JPanel(new MigLayout());
    
    panel.add(firstNameLabel);
    panel.add(firstNameTextField);
    panel.add(lastNameLabel,       "gap unrelated");
    panel.add(lastNameTextField,   "wrap");
    panel.add(addressLabel);
    panel.add(addressTextField,    "span, grow");
    ".add" doesn't even exist, and when I type "panel.add(firstNameLabel);", Netbeans throws the error "Create Class 'firstNameLabel' in <Package>?" WTF? If you need to create the labels, the please do so with so-called "getting started" code. Oh, and don't have methods that don't even exist. (like the ".add").


    Is there ANY REAL "new to MigLayout" code? Obviously, the creator doesn't want anyone using his engine.


    Update: MigLayout just doesn't work. I created a MigLayout (
    Java Code:
    MigLayout layout1 = new MigLayout();
    ), and I cannot even REFERENCE my manually created labels. Why is MigLayout SO HARD TO USE WHEN THE FUCKING WEBSITE TELLS YOU "OH, THIS CODE PRODUCES THIS"??????
    Last edited by EarthModder1; 01-21-2014 at 10:42 AM.

  2. #2
    PhHein's Avatar
    PhHein is offline Senior Member
    Join Date
    Apr 2009
    Location
    Germany
    Posts
    1,430
    Rep Power
    7

    Default Re: MigLayout "Getting Started" - More like "throw ya in the water and hope you can s

    Maybe you should ask the creator?
    Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x]
    The Ubiquitous Newbie Tips

  3. #3
    SurfMan's Avatar
    SurfMan is offline Godlike
    Join Date
    Nov 2012
    Location
    The Netherlands
    Posts
    926
    Rep Power
    2

    Default Re: MigLayout "Getting Started" - More like "throw ya in the water and hope you can s

    Dude, chill. You fucked up your project SDK settings. The .add is a method of JPanel, not MigLayout. So that only means your Netbeans doesn't like your JPanel. The example you show is correct. I use MigLayout exactly like that for years, no problems ever.
    "It's not fixed until you stop calling the problem weird and you understand what was wrong." - gimbal2 2013

  4. #4
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,375
    Blog Entries
    7
    Rep Power
    20

    Default Re: MigLayout "Getting Started" - More like "throw ya in the water and hope you can s

    The OP's remarks about the getting started code (I read the PDF) clearly show that the OP can't program himself out of a wet paper bag and shouldn't even attempt to use a versatile piece of software.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  5. #5
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    3,758
    Rep Power
    5

    Default Re: MigLayout "Getting Started" - More like "throw ya in the water and hope you can s

    If you want serious replies, ask a serious question and not one that revolves around the F-bomb.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

Similar Threads

  1. Replies: 0
    Last Post: 12-07-2012, 08:29 AM
  2. Replies: 3
    Last Post: 10-30-2012, 03:06 PM
  3. Replies: 1
    Last Post: 02-01-2012, 08:37 PM
  4. Replies: 2
    Last Post: 01-24-2009, 06:56 PM
  5. Replies: 1
    Last Post: 10-20-2008, 07:35 AM

Posting Permissions

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