Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8930273
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T08:51:20+00:00 2026-06-15T08:51:20+00:00

I am using Windows 7, Eclipse 4.2.1 and (trying to use) MigLayout 4.0. I

  • 0

I am using Windows 7, Eclipse 4.2.1 and (trying to use) MigLayout 4.0.

I have downloaded miglayout-4.0-swing.jar, added it to my classpath and succesfully run the following script in Groovy Console:

import groovy.swing.SwingBuilder
import groovy.swing.factory.LayoutFactory
import javax.swing.WindowConstants as WC
import net.miginfocom.swing.MigLayout

def swing = new SwingBuilder()
swing.registerBeanFactory('migLayout', MigLayout)

swing.build {
    frame(id: 'eventScrollPanel', pack: true, show: true,
      defaultCloseOperation: WC.EXIT_ON_CLOSE) {
        migLayout(layoutConstraints: "fill, debug", columnConstraints: "",
        rowConstraints: "")
        panel() {
            label(text: "test")
        }
    }
}

In Eclipse, I have added the external jar file to my JDK and checked that it appears in Project => Properties => Java Build Path => Libraries tab => JRE System Library [jdk1.7.0_09]. However, the script fails with the following error:

Caught: java.lang.ExceptionInInitializerError
java.lang.ExceptionInInitializerError
    at net.miginfocom.layout.UnitValue.<init>(Unknown Source)
    at net.miginfocom.layout.UnitValue.<clinit>(Unknown Source)
    at net.miginfocom.layout.PlatformDefaults.<clinit>(Unknown Source)
    at net.miginfocom.swing.MigLayout.<init>(Unknown Source)
    at net.miginfocom.swing.MigLayout.<init>(Unknown Source)
    at MigLayoutExamples$_run_closure1_closure2.doCall(MigLayoutExamples.groovy:12)
    at MigLayoutExamples$_run_closure1_closure2.doCall(MigLayoutExamples.groovy)
    at MigLayoutExamples$_run_closure1.doCall(MigLayoutExamples.groovy:10)
    at MigLayoutExamples$_run_closure1.doCall(MigLayoutExamples.groovy)
    at MigLayoutExamples.run(MigLayoutExamples.groovy:9)
Caused by: java.lang.NullPointerException
    at net.miginfocom.layout.LayoutUtil.hasBeans(Unknown Source)
    at net.miginfocom.layout.LayoutUtil.<clinit>(Unknown Source)
    ... 10 more

Also, the migLayout reference at the start of line 12 of the script is underlined by Eclipse, i.e. Eclipse canot resolve the reference.

All help gratefully appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T08:51:21+00:00Added an answer on June 15, 2026 at 8:51 am

    Looks like this line is the culprit.

    LayoutUtil.class.getClassLoader().loadClass("java.beans.Beans");
    

    The latest jar is 4.2 where this issue seems to have been fixed with a try-catch block.
    Try with these jars. They are available from Maven repo. http://mvnrepository.com/artifact/com.miglayout/miglayout-swing/4.2
    http://mvnrepository.com/artifact/com.miglayout/miglayout-core/4.2

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Java 1.6 , Eclipse , Windows 7. I'm trying to run commands
I'm trying to use SendInput() on Windows but I'm building under MinGW using Eclipse
I am using Windows Vista 32bit . I have installed Eclipse Helios Service Release
I am using Eclipse on Windows XP. I downloaded the GeoTools 2.7.4-bin.zip file and
I have just developed and exported a Runnable JAR using Eclipse on my 64
I am using Eclipse in windows laptop. Once opened the eclipse Am trying to
I am trying to determine if Eclipse on Windows add control-M characters. I have
I'm trying to run eclipse for java in Windows 7 64bit edition, and when
I'm using Eclipse on Windows to program C++ using Cygwin's toolchain. I would like
I am using Android SDK 16.1 with Eclipse on Windows. I've set ANDROID_LINT_COMPLETE_REGIONS as

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.