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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T18:45:25+00:00 2026-06-17T18:45:25+00:00

There is a List containing TextFields. The problem is that these fields are not

  • 0

There is a List containing TextFields. The problem is that these fields are not editable ! Here are codes :

    public formConstructor()
    {
       ...
       private Vector vList = new Vector(); // datasource of the list
       private CListCellProduits listRenderer;
       private List list;
       ...
       listRenderer          = new CListCellProduits(20);
       vList.addElement(new String("P001;"));
       vList.addElement(new String("P002;"));
       list             = (new ListUtil(vList)).createList(listRenderer);
       addComponent(list);
       ...
    }

    public class CListCellProduits extends Container implements ListCellRenderer {
        private Label focus = new Label("");
        private Label lData;
        private Champ sortie = new Champ("123", TextArea.NUMERIC);
        private Champ dispo = new Champ("123", TextArea.NUMERIC);
        private int widthCommun;
        private Container cRow1 = new Container(new BoxLayout(BoxLayout.X_AXIS));

        public CListCellProduits(int widthCommun)
        {
            super();
            setLayout(new BoxLayout(BoxLayout.Y_AXIS));

            lData = new Label("");

            sortie.setPreferredW(widthCommun);
            dispo.setPreferredW(widthCommun);
            this.widthCommun = widthCommun;

            cRow1.addComponent(lData);
            cRow1.addComponent(sortie);
            cRow1.addComponent(dispo);
            addComponent(cRow1);
        }
        public Component getListCellRendererComponent(List list, Object value, int index, boolean isSelected)
        {
            Content entry = null;
            if (value instanceof Content)
                entry = (Content)value;
            if (!"".equals(entry.getColumn(0)))
                lData.setText(entry.getColumn(0));
            else
                lData.setText("-");
            lData.setPreferredW(widthCommun);
            list.repaint();

            return this;
        }
        public Component getListFocusComponent(List arg0)
        {
            return focus;
        }
    }

    public class ListUtil {

        private Vector data = new Vector();
        private Content[] contents;

        public ListUtil(Vector vData)
        {
            data = vData;
            contents = new Content[vData.size()];
        }

        public List createList(CListCellProduits renderer)
        {
            CList theList;
            for(int i = 0; i < data.size(); i++)
            {
                contents[i] = new Content(String.valueOf(data.elementAt(i)));
            }
            theList = new CList(contents, renderer);
            return theList;
        }
    }

    public class CList extends List {
        public CList(Object[] data, CListCellProduits renderer)
        {
            super(data);
            setListCellRenderer(renderer);
            setScrollAnimationSpeed(getScrollAnimationSpeed()/4);
        }
    }

public class Champ extends TextField {

    public Champ(String imo)
    {
        super();
        setReplaceMenu(false);
        setInputModeOrder(new String[]{imo});
    }
    public Champ(String imo, int contrainte)
    {
        super();
        setReplaceMenu(false);
        setInputModeOrder(new String[]{imo});
        setConstraint(contrainte);
    }
    protected Command installCommands(Command clear, Command t9)
    {
        return null;
    }
}

At runtime it gives something like this :

enter image description here

So how to make the TextFields editable ?

  • 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-17T18:45:26+00:00Added an answer on June 17, 2026 at 6:45 pm

    That is not possible in List.

    List is only for displaying list of clickable items not for Text Field.

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

Sidebar

Related Questions

Is there a list of items on the web that you should not use
Is there a list of COM error codes somewhere? Related: HRESULT: 0x80010105 (RPC_E_SERVERFAULT) question
I have a JSF converter that I use for a SelectItem list containing several
Consider code: public List<Products> listProducts(){ ... return (List<Products>) query.list(); // returning a list containing
Given a list containing a known pattern surrounded by noise, is there an elegant
Problem explained: Given a list containing 10 items. My first action is to (mouse)
I have a list of objects that contain row data for a table. There
So here i have a couple of defined list that i would like to
Is there a way that I can give python a list of values like
I have a form (todo list) containing labels/checkboxes (todos) as follows: <form class=tasklist> These

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.