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 8402057
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T21:57:16+00:00 2026-06-09T21:57:16+00:00

I have written a Java application using Eclipse Juno on Fedora 17. I have

  • 0

I have written a Java application using Eclipse Juno on Fedora 17. I have JRE 1.7 installed, but I changed the Java build path to 1.6, I believe. Everything works fine there. I can then build a .jar file which runs on a Windows 7 virtual machine without problems. However, if I try to run it on the school computers (Windows 7
java version "1.6.0_18"
Java(TM) SE Runtime Environment (build 1.6.0_18-b07)
Java HotSpot(TM) Client VM (build 16.0-b13, mixed mode, sharing)
)

it gives an exception like: java.lang.IllegalArgumentException: cannot add to layout: constraint must be a string. This is apparently something to do with CardLayout, which I believe is a standard Swing component.

I am using miglayout library and sqlite-jdbc driver if that could be related.

I would really appreciate help with this

  • 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-09T21:57:17+00:00Added an answer on June 9, 2026 at 9:57 pm

    I found the problem.

    cardLayoutPanel is a JPanel
    cardLayout is obvious
    identifier is a String

    cardLayoutPanel.add(container);
    cardLayout.addLayoutComponent(container, identifier);
    

    turns out that in Java 1.6 this doesn’t really work because it should actually be:

    cardLayoutPanel.add(container, identifier);
    

    without the second line
    Java 1.7 doesn’t complain for some reason. Weird.

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

Sidebar

Related Questions

I have web application written in java using Eclipse. It has just one servlet
I have written an application in Java using Eclipse IDE and I now need
My web application is written using jsp/javascripts. Backend Java. Have managed to implement the
In my application I have written my own Logging utility using Java.Util.Logging import java.io.IOException;
I have application written in Java that is using EJB3 + Toplink. I'm using
I have written a Java GUI using SWT. I package the application using an
I have a web application written using Java servlets. I am using Tomcat 7
I have written an application in Java for both Mac OSx and Windows, but
I have a self-written Java application - a little mail monitor. It works with
I have my java-written application being killed after some time of work. Java application

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.