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

  • Home
  • SEARCH
  • 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 7446555
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T12:20:36+00:00 2026-05-29T12:20:36+00:00

Is all in the title, I do not understand the problem this time is

  • 0

Is all in the title,
I do not understand the problem this time is a bit different, I used the same Object(List) for two different programs and it does not work in the second time, see :

private void jMenuItem23ActionPerformed(java.awt.event.ActionEvent evt) {                                            
init_creer_client();
List  items  = new ArrayList();
items.add("mawren");
items.add("blabla");
items.add("Bonjour");

CL.show(cartes,"creer_client");       
}   

screenshot about the error :
enter image description here

by cons here its work smoothly :

 import java.awt.Dimension;
 import java.awt.HeadlessException;
 import java.util.ArrayList;
 import java.util.List;
 import javax.swing.JFrame;
 import javax.swing.JPanel;
 import javax.swing.JTextField;
 import org.jdesktop.swingx.autocomplete.AutoCompleteDecorator;

 public class Test_swingx extends JFrame {

public Test_swingx(String title) throws HeadlessException {

this.setTitle(title);
JPanel pan=new JPanel();
JTextField jtf=new JTextField();
jtf.setColumns(20);
List items  = new ArrayList();
items.add("hello");
items.add("marwen");
items.add("allooo");
AutoCompleteDecorator.decorate(jtf, items,false);
pan.add(jtf);
this.setContentPane(pan);
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
this.setVisible(true);
this.setBounds(280, 150, 500, 200);

}


 public static void main(String[] args) {

Test_swingx tsx=new Test_swingx("helloo swingx");

}
}

can anyone explain to me ?

  • 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-05-29T12:20:37+00:00Added an answer on May 29, 2026 at 12:20 pm

    You have a java.awt.List import should be java.util.List

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

Sidebar

Related Questions

First of all, I'm not sure if the title accurately describes what I'm referring
First of all, sorry about that title. I'm not the best at writing those
I do not understand why i am getting this error. Here is the related
I think the title for this question is probably wrong, but I'm not sure
This title is not fully depicted what I mean, but I just can't come
I don't understand this at all. Here is some Javascript code that works in
It's all in the title; super-simple I reckon, but it's so hard to search
Actually my question is all in the title. Anyway: I have a class and
Question title says it all really - a lot slower than VS2005, with a
The title should say it all, then I can solidify 2 more ticks on

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.