Problem with my ComboBox

Hi,
I have a demo containing many sections. At the end of each
section a clip is loaded from the library that has a bunch of links
and a comboBox in it that lists all the other sections. Everything
is working as it should except that when you open the comboBox the
list appears behind everything else in the clip.
Why why why?
Also, is there a way to embed fonts in to the fields of the
list as with dynamic text fields so that alpha effect etc can be
applied to the CB (the movie it is in fades up from alpha 0 but the
CB text just appears)
Thanks for any help

Here's how I'm proceeding :
I click one time on the ComboBox to open the item list. Then, the list appears.
So, I click a second time on the wanted item. Then, the list disappears (it's normal !) but the wanted item is not selected !
I've tried to put "System.out.println" everywhere in my code and I saw that it seems that both item events and action events (depending on the case) are not captured !
Caro

Similar Messages

  • Problem with userdefined combobox selection

    Hi guys,
    Have an "AutoSearchComboBox" as follows for searching the combolist fast.Have some problems with the selection in the AutoSearchComboBox.
    *public class AutoSearchComboBox extends JComboBox {*
    private static final long serialVersionUID = 1L;
    *public AutoSearchComboBox(){*
    setEditable(true);
    setModel(new AutoSearchComboBoxModel());
    setEditor(new MyComboBoxEditor());
    public class AutoSearchComboBoxModel extends AbstractListModel
    *implements MutableComboBoxModel{*
    private static final long serialVersionUID = 1L;
    private Vector items,filteredItems;
    private Filter filter;
    private Object selectedItem;
    *public AutoSearchComboBoxModel(){*
    this.items = new Vector();
    this.filteredItems = new Vector();
    this.filter = null;
    updateFilteredItems();
    *public void addElement(Object obj) {*
    items.add(obj);
    updateFilteredItems();
    public void insertElementAt(Object obj, int index) {}
    *public void removeElement(Object obj) {*
    items.remove(obj);
    updateFilteredItems();
    *public void removeElementAt(int index) {*
    items.remove(index);
    updateFilteredItems();
    *public Object getSelectedItem() {*
    return selectedItem;
    *public void setSelectedItem(Object anItem) {*
    if ((selectedItem==null) && (anItem==null))
    return;
    if ((selectedItem != null) && (selectedItem.equals(anItem)))
    return;
    if(anItem!= null && anItem.equals(selectedItem))
    return;
    selectedItem = anItem;
    fireContentsChanged(this, -1,-1);
    *public Object getElementAt(int index) {*
    return filteredItems.get(index);
    *public int getSize() {*
    return filteredItems.size();
    *public void setFilter(Filter filter){*
    this.filter = filter;
    updateFilteredItems();
    *public void updateFilteredItems(){*
    fireIntervalRemoved(this,0,filteredItems.size());
    filteredItems.clear();
    if(filter==null)
    filteredItems.addAll(items);
    else
    *for(Iterator iter = items.iterator(); iter.hasNext();){*
    Object item = iter.next();
    if (filter.accept(item))
    filteredItems.add(item);
    fireIntervalAdded(this,0, filteredItems.size());
    *public static interface Filter{*
    public boolean accept(Object obj);
    *class FilterItems implements Filter{*
    private String prefix;
    *public FilterItems(String prefix){*
    this.prefix = prefix;
    *public boolean accept(Object obj){*
    return doesStartsWithThePrefix(obj.toString(),prefix);
    *private boolean doesStartsWithThePrefix(String str1,String str2){*
    return str1.toUpperCase().startsWith(str2.toUpperCase());
    *public class MyComboBoxEditor implements ComboBoxEditor,DocumentListener{*
    private JTextField text;
    private volatile boolean filtering = false;
    private volatile boolean setting = false;
    *public MyComboBoxEditor(){*
    text = new JTextField(15);
    text.getDocument().addDocumentListener(this);
    *public void addActionListener(ActionListener l) {*
    *// TODO Auto-generated method stub*
    *public void removeActionListener(ActionListener l) {*
    *// TODO Auto-generated method stub*
    *public Component getEditorComponent() {*
    return text;
    *public void setItem(Object anObject) {*
    if(filtering)
    return;
    setting = true;
    String newText = (anObject==null)? "":anObject.toString();
    text.setText(newText);
    setting = false;
    *public Object getItem() {*
    return text.getText();
    *public void selectAll() {*
    text.selectAll();
    *public void changedUpdate(DocumentEvent e) {*
    *// TODO Auto-generated method stub*
    *public void insertUpdate(DocumentEvent e) {*
    handleChange();
    *public void removeUpdate(DocumentEvent e) {*
    handleChange();
    *public void handleChange(){*
    if(setting)
    return;
    filtering = true;
    Filter filter = null;
    if(text.getText().length()>0)
    filter = new FilterItems(text.getText());
    *((AutoSearchComboBoxModel)getModel()).setFilter(filter);*
    setPopupVisible(false);
    if (getModel().getSize()>0)
    setPopupVisible(true);
    filtering = false;
    Iam creating the combo boxes as follows from another source file.
    private AutoSearchComboBox indexTagCombo,indexValueCombo
    //The following function is called for loading the comboBoxes.
    private void loadInitialIndexTagValues()
    indexTagCombo.removeAllItems();
    //Getting values to be fiiled in the comboBox.
    Set tags = this.model.getAvailableIndexTags();
    // Iterating over the elements in the set
    Iterator tagIter = tags.iterator();
    while (tagIter.hasNext()) {
    indexTagCombo.addItem(tagIter.next());
    //Loading index values.
    String currTag = (String)indexTagCombo.getSelectedItem(); //Selection problem 1
    The statement above returns me null & the follwing code doesnt fill the other comboBox.
    Set values = model.getAllValues(currTag);
    indexValueCombo.removeAllItems();
    Iterator valIter = values.iterator();
    while (valIter.hasNext()) {
    indexValueCombo.addItem(valIter.next());
    Have added an "itemListener" to the indexTagCombo as follows:
    indexTagCombo.addItemListener(new ItemListener(){
    public void itemStateChanged(ItemEvent e)
    indexTagSelection(e);
    private void indexTagSelection(ItemEvent e) {
    if (e.getStateChange() == ItemEvent.SELECTED)
    //The "getStateChange" is never ItemEvent.SELECTED,so that it never gets in to this loop.//Another problem
    //code goes Here
    There is some problem with the defined "AutoSearchComboBox" with selection.When I change the privately defined "AutoSearchComboBox" to JComboBox and make it editable,all the selection problems are gone.
    In short all the "getSelectedItem" from the "AutoSearchComboBox" and the "itemstate" events defined are not going to the "ItemEvent.SELECTED"
    What should I fix in the "AutoSearchComboBox" so that the selections work.
    Any help is greatly appreciated.
    Thanks
    P

    Hi Smita,
    When you create the Transaction code either thru Se80 or thru Se93... please see that you are giving the screen number asked there as 1000, which is the default screen number for the selection screen.
    Also, please see if the checkboxes for the GUI Support are ticked. I think it iwll solve you problem.
    Regards,
    Jayant

  • Problems with linked ComboBoxes

    Hi everyone, and thanks to those who will reply
    It's been 3 days since i'm having the same problem :
    I have 2 comboboxes in a JPanel, and the things to be displayed in the second one depends on the first (for example selecting 'Hewlett-Packard' in the first combo box display all HP model in the second one)
    When i select a item in the first combobox, an actionPerformed is fired, and i can populate the second combobox. Unfortunately, the combobox disappear in my panel, but if i click on the place where it used to be, the popup list display correctly... !
    I just want to know hox can i make it visible anyway. I've tried combobox2.repaint() method within the actionperformed method (combobox2 is the name of my second combo box as you've guessed), but it doesnt work...
    Something else too : in my first list, if i select another vendor, the list in the second is not removed, but the list of workstation of the second-select manufacturer is appended... I've tried here the combobox2.removeall() method, but here again, no results....
    this is my code :
    public class DocPCConfig extends JFrame implements ActionListener, WindowListener
    /** D�clare les variables utilis�es **/
    JComboBox comboConstructeurs, comboMachines;
    private JPanel imagePanel, panelConstructeur, panelMachines;
    * DocPCConfig()
    * Constructeur par d�faut
    * - But : Initialise les composants Swing de la fen�tre principale
    * - E : -/-
    * - S : -/-
    public DocPCConfig()
    /** Ajoute les composants dans l'onglet **/
    ajoutCompoCstr();
    /** Ajoute un �couteur d'�v�nement de fen�tre **/
    addWindowListener(this);
    * main()
    * - But : Point d'entr�e de l'application
    * - E : String args[] : Tableau de param�tres
    * - S : -/-
    public static void main(String args[])
    System.out.println("Lancement de l'application de configuration");
    new BdD();
    mainFrame = new DocPCConfig();
    mainFrame.setSize(1024,738);
    mainFrame.setTitle("DocPCConfig");
    mainFrame.setVisible(true);
    * ajoutCompoCstr()
    * - But : Ajoute les composants pour le panel de s�lection constructeur/machine (1er onglet)
    * - E : -/-
    * - S : -/-
    public void ajoutCompoCstr()
    java.awt.GridBagConstraints gridBagConstraints1;
    /** Cr�e le vecteur stockant les r�sultats provenant de la BdD **/
    Vector listeConstructeurs = new Vector(10,5);
    /** Se connecte � la BdD **/
    BdD.connecteBdD();
    /** R�cup�re la liste des constructeurs depuis la BdD **/
    listeConstructeurs = BdD.getConstructeurs();
    DefaultComboBoxModel comboModele = new DefaultComboBoxModel(listeConstructeurs);
    BdD.deconnecteBdD();
    /** Lance le constructeur pour la liste d�roulante avec le vecteur de liste
    comme param�tre **/
    comboConstructeurs = new JComboBox(comboModele);
    /** R�gle les param�tres suppl�mentaires **/
    comboConstructeurs.setMaximumSize(new Dimension(5,5));
    comboConstructeurs.setSelectedIndex(-1);
    // comboConstructeurs.setEditable(true);
    /** Ajoute les contraintes graphiques pour la liste des constructeurs **/
    gridBagConstraints1 = new GridBagConstraints();
    gridBagConstraints1.gridx = 1;
    gridBagConstraints1.gridy = 1;
    gridBagConstraints1.insets = new Insets(10, 10, 10, 10);
    panelConstructeur.add(comboConstructeurs, gridBagConstraints1);
    comboConstructeurs.addActionListener(this);
    /** Cr�e les �l�ments de la liste d�roulante **/
    String[] listeMachines = { "                             " };
    comboMachines = new JComboBox(listeMachines);
    comboMachines.setSelectedIndex(0);
    /** Ajoute les contraintes graphiques pour la liste des machines **/
    gridBagConstraints1 = new GridBagConstraints();
    gridBagConstraints1.gridx = 1;
    gridBagConstraints1.gridy = 2;
    gridBagConstraints1.insets = new Insets(10, 10, 10, 10);
    panelConstructeur.add(comboMachines, gridBagConstraints1);
    * actionPerformed(ActionEvent ae)
    * - But : Traiter les op�ration quand une action est effectu�e sur les boutons
    * de l'interface de la fen�tre principale.
    * - E : ActionEvent ae : Un pointeur sur l'action courante.
    * - S :-/-
    public void actionPerformed(ActionEvent ae)
    Object source = ae.getSource();
    /** Liste d�roulante des constructeurs **/
    if (source == comboConstructeurs)
    /** R�cup�re la ligne s�lectionn�e dans la liste **/
    String constructeur = (String)comboConstructeurs.getSelectedItem();
    /** Creation des �l�ments de la liste d�roulante **/
    Vector listeMachines = new Vector(50,1);
    /** Se connecte � la BdD **/
    BdD.connecteBdD();
    listeMachines = BdD.getMachines(constructeur);
    /** Se d�connecte de la BdD **/
    BdD.deconnecteBdD();
    /** Supprime toutes les pr�c�dentes entr�es de la liste des machines **/
    comboMachines.removeAll();
    int i = 0;
    System.out.println(listeMachines.size());
    /** Tant que la liste n'a pas �t� parcourue **/
    while(i < listeMachines.size())
    /** Copie l'�l�ment du vecteur et l'ajoute dans la liste d�roulante **/
    comboMachines.addItem(listeMachines.elementAt(i).toString());
    i++;
    comboMachines.repaint();
    I've removed all the things I found useless, but maybe i've removed too much ;-) I hope that this code is enough.
    Thanks for your help (can you send a copy of your answers at : [email protected] - if you're too lazy to do this that's not a matter, but i don't know how i can find my post in all these posts... so that'd be cool ;-)

    Thanks Martin
    that makes sense now was driving me mad as I couldnt find anything saying it wasnt supported, makes sense seeing as its a flash server. Annoyning thing was it was playing in the content viewer locally when I previewd the folio you would think that would not be the case if it was not supported. Im going to try the rtmp links in a player in a web page and view it on the ipad out of curiosity and ill let you know. Out of interest have you done anyting with imported html into indesign as part of your folios ? I havent as yet but am curious to know how it holds up ?
    Thanks again
    Neil

  • Problem with InfoSwing comboboxes

    I posted a message earlier concerning JDeveloper 2.0's InfoSwing
    ComboBoxControl. I have a little more information that might
    help someone who has used JDeveloper figure the problem out. The
    problem is that I place the combobox controls on my form and set
    the dataItemName and dataItemNameForUpdate properties but when I
    run the applet and click on the combobox, the list doesn't show
    up. In fact, I get the following error:
    java.lang.NullPointerException
    at javax.swing.JComboBox.getSelectedIndex(Compiled Code)
    at
    javax.swing.plaf.basic.BasicComboPopup.syncListSelectionWithCombo
    BoxSelection(Compiled Code)
    at javax.swing.plaf.basic.BasicComboPopup.show(Compiled
    Code)
    at
    javax.swing.plaf.basic.BasicComboPopup.togglePopup(Compiled Code)
    at
    javax.swing.plaf.basic.BasicComboPopup$InvocationMouseHandler.mou
    sePressed(Compiled Code)
    at java.awt.AWTEventMulticaster.mousePressed(Compiled
    Code)
    at java.awt.Component.processMouseEvent(Compiled Code)
    at java.awt.Component.processEvent(Compiled Code)
    at java.awt.Container.processEvent(Compiled Code)
    at java.awt.Component.dispatchEventImpl(Compiled Code)
    at java.awt.Container.dispatchEventImpl(Compiled Code)
    at java.awt.Component.dispatchEvent(Compiled Code)
    at
    java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:
    1739)
    at
    java.awt.LightweightDispatcher.processMouseEvent(Container.java:1
    533)
    at
    java.awt.LightweightDispatcher.dispatchEvent(Container.java:1453)
    at java.awt.Container.dispatchEventImpl(Compiled Code)
    at java.awt.Component.dispatchEvent(Compiled Code)
    at
    java.awt.EventDispatchThread.run(EventDispatchThread.java:79)
    Can someone please help me? I am desperate!
    Thanks in advance,
    Joel
    null

    No Joel,
    it seems that the JDev Team is unable to give a proper support
    for their product. I wouldn't have been able too if I had
    released a product with a bugs like that (e.g. combo boxes not
    been able to populate). May be this is the reason Oracle is in
    such a hurry trying to release JDeveloper 3.0. Well, let's hope
    the bugs in the new version will decrease rather than increase.
    For now I would suggest to you to try Symantec's Visual Cafe or
    even Borland's JBuilder may suit what you need.
    BTW, I left the ideas to finish my project using Java and went
    back to the more stable combination Perl/CGI/HTML.
    Mitko
    JDev Team (guest) wrote:
    : The ComboBoxControl is a composite control that uses the
    : JComboBox so if it isn't working then the ComboBoxControl won't
    : work. You need to resolve the issue with JComboBox first.
    : - PSW
    : Joel (guest) wrote:
    : : They were bound to the same db table column, but I thought
    that
    : : might be wrong, so I added another rowSetInfo to my
    : sessionInfo,
    : : and had the query look for all distinct values in the column
    : that
    : : I want to populate my combobox with. I tied the DataItemName
    : to
    : : the new rowSetInfo (only had one column), and the
    : : DataItemNameForUpdate to the same column name, but on the
    first
    : : rowSetInfo. So I have one sessionInfo component, and two
    : : rowSetInfo components. I did all this using the property
    : : editor.
    : : Just one more note: In desperation, I created a new project
    : and
    : : placed a regular Jcombobox on a form and added some items to
    it
    : : programatically, and could not get the combobox's popup list
    to
    : : show up. I could move through each item in the ComboBox by
    : using
    : : the arrow keys on the keyboard, but not with the mouse. Do
    you
    : : think this could be related to the problem I am having with
    the
    : : InfoSwing components?
    : : Thank you for your time,
    : : Joel
    : : JDev Team (guest) wrote:
    : : : Are the DataItemName and DataItemNameForUpdate properties
    : bound
    : : : to the same db table column? How did you do the binding -
    : using
    : : : the property editor or programmatically?
    : : : - PSW
    : : : Joel (guest) wrote:
    : : : : So far I haven't even had the chance to try my applet
    on
    : a
    : : : : browser. I have been running it on my local computer
    (not
    : : from
    : : : a
    : : : : web server). I have been using JDeveloper's Applet
    Viewer,
    : : and
    : : : : the data from the Oracle table shows up, so I'm pretty
    sure
    : : : it's
    : : : : having no problem connecting to the Oracle table, but the
    : : : : comboboxes won't show the list of choices.
    : : : : Thank you,
    : : : : Joel
    : : : : Jdev Team (guest) wrote:
    : : : : : What version of the Java Plug-in are you using? What
    : : browser
    : : : : and
    : : : : : version?
    : : : : : - PSW
    : : : : : Joel (guest) wrote:
    : : : : : : I posted a message earlier concerning JDeveloper
    2.0's
    : : : : : InfoSwing
    : : : : : : ComboBoxControl. I have a little more information
    that
    : : : might
    : : : : : : help someone who has used JDeveloper figure the
    problem
    : : : out.
    : : : : : The
    : : : : : : problem is that I place the combobox controls on my
    : form
    : : : and
    : : : : : set
    : : : : : : the dataItemName and dataItemNameForUpdate properties
    : but
    : : : : when
    : : : : : I
    : : : : : : run the applet and click on the combobox, the list
    : : doesn't
    : : : : show
    : : : : : : up. In fact, I get the following error:
    : : : : : : java.lang.NullPointerException
    : : : : : : at
    : : javax.swing.JComboBox.getSelectedIndex(Compiled Code)
    : : : : : : at
    javax.swing.plaf.basic.BasicComboPopup.syncListSelectionWithCombo
    : : : : : : BoxSelection(Compiled Code)
    : : : : : : at
    : : javax.swing.plaf.basic.BasicComboPopup.show(Compiled
    : : : : : : Code)
    : : : : : : at
    : : javax.swing.plaf.basic.BasicComboPopup.togglePopup(Compiled
    : : : : : Code)
    : : : : : : at
    javax.swing.plaf.basic.BasicComboPopup$InvocationMouseHandler.mou
    : : : : : : sePressed(Compiled Code)
    : : : : : : at
    : : java.awt.AWTEventMulticaster.mousePressed(Compiled
    : : : : : : Code)
    : : : : : : at java.awt.Component.processMouseEvent(Compiled
    : : Code)
    : : : : : : at java.awt.Component.processEvent(Compiled Code)
    : : : : : : at java.awt.Container.processEvent(Compiled Code)
    : : : : : : at java.awt.Component.dispatchEventImpl(Compiled
    : : Code)
    : : : : : : at java.awt.Container.dispatchEventImpl(Compiled
    : : Code)
    : : : : : : at java.awt.Component.dispatchEvent(Compiled
    : : Code)
    : : : : : : at
    java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:
    : : : : : : 1739)
    : : : : : : at
    java.awt.LightweightDispatcher.processMouseEvent(Container.java:1
    : : : : : : 533)
    : : : : : : at
    java.awt.LightweightDispatcher.dispatchEvent(Container.java:1453)
    : : : : : : at java.awt.Container.dispatchEventImpl(Compiled
    : : Code)
    : : : : : : at java.awt.Component.dispatchEvent(Compiled
    : : Code)
    : : : : : : at
    java.awt.EventDispatchThread.run(EventDispatchThread.java:79)
    : : : : : : Can someone please help me? I am desperate!
    : : : : : : Thanks in advance,
    : : : : : : Joel
    null

  • HTMLLoader problem with comboBox

    hi guys
    I'm trying to loader pdf file using XML to retrieve the URL  and I have CombBox to list all the files ,and I need to load another file every time I change the silder for the CombBox
    the problem is the pdf file load only first time and dosent  change if I select another one from the list, I dont know what the the probelm I tried manything like removeChild and I tried to use container but no change, only first time the file loaded
    this is the code
    cb_list.addEventListener(
    SliderEvent.CHANGE,changehandler);
    function changehandler(e:Event):void {
        var sort1:String=cb_list.value;
        var id:String = myXML.tip.(title == sort1)[email protected]();
         //trace(id)
        var slectedtip = myXML.tip.(title == sort1).fulltip.text();
        tit_label.text=myXML.tip.(@ID == id).title .text();
        date_label.text=myXML.tip.(@ID == id).date.text();
        full_tip.text=myXML.tip.(@ID == id).fulltip.text();
         var flashfileURL = myXML.tip.(@ID == id).picURL.text();
        swfURL.text=flashfileURL;
        var url:String = new String();
        url= myXML.tip.(@ID == id).picURL.text().toXMLString();
        var requestpdf:URLRequest=new URLRequest(url);
         var container:Sprite = new Sprite();
        var pdf = new HTMLLoader();
        pdf.height=stage.stageHeight-150;
        pdf.width=stage.stageWidth-270;
        pdf.y=100;
        pdf.x=260;
        pdf.load(requestpdf);
           pdf.addEventListener(Event.COMPLETE, completeHandler);
        function completeHandler(event:Event):void {
            addChild(pdf);

    [problem with combobox comes infront of popup window|http://forum.java.sun.com/thread.jspa?threadID=5291468]

  • Problem with ComboBox / Matrix

    Hi all,
    I have this problem... when I try to populate a column with comboxbox ...
    Code:
            Set co = lmatrix.Columns.Add("orgDist", it_COMBO_BOX)
                co.TitleObject.Caption = "Dist"
                co.Editable = True
                co.Visible = True
                co.DataBind.SetBound True, "@DIST", "Code"
            Set DBSource = lfrm.DataSources.DBDataSources.Item("@DIST")
                DBSource.Query
                For x = 0 To DBSource.Size - 1
                    tp1 = Trim(DBSource.GetValue("Code", x))
                    tp2 = Trim(DBSource.GetValue(3, x))
                    co.ValidValues.Add tp1, tp2
                    DBSource.Offset = x
                Next
    - at the 'co.ValidValues.Add tp1,tp2' I receive this error
      'Valid Value - The Value Exceed boundaries'
    - tp1 max value is of 8 Char
    - tp2 max value is of 50 Char
    I've try to insert manually the value like validvalue.add "101","23123123....213" and it work correctly..
    where is my error??
    Bye!!
    PS: Sorry for my english

    Hi,
    There's no problem with your code itself (however you don't need to set the DBDataSource offset, if you are only filling the ComboBox - GetValue picks the right data anyway...). It works fine (at least with 2004 PL23 + 2005 Build 119).
    Looks like a problem with your data (or some "old" bug, but this would be the first time I heard about it...)?
    ...or did you solve it in the meantime?
    Regards,
    Frank

  • Problem with combobox gets dispalyed infront of popup window

    when ever popup window is open and kept on combobox ,combobox appears in front or overlaps the popup window,where exactly i have to check the code.which place of code i have to look into... plz help if there is any problem with css then plz specify which property i have to look into..

    [problem with combobox comes infront of popup window|http://forum.java.sun.com/thread.jspa?threadID=5291468]

  • Problem with comboBox editor

    Hi experts,
    i am keeping a combobox renderer and editor in my JTable for 2 columns say 5th column and 7th column.
    In renderer no Problem.
    But while i am editing ,whenever i am choosing a perticular item from the drop down in the first row of table,it is affecting the remaining set of rows.,not all the rows also.
    for example,next 5 rows are getting the same selected value.
    next some 2 rows are getting affected.
    the below 2 class are my renderer and editor.public class ComboBoxRenderer extends JComboBox implements TableCellRenderer {
            public ComboBoxRenderer(String[] items) {
                            super(items);
            public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
                    if (isSelected) {
                    // Select the current value
                    setSelectedItem(value);
                    return this;
    }My ComboBox editor is public class ComboBoxEditor extends DefaultCellEditor {
            public ComboBoxEditor(String[] items) {
                   super(new JComboBox(items));
    }so i am using this render and editor in my swing screen by the following codeString strSP[] = {"P", "O", "H", " "};
    column5.setCellEditor(new ComboBoxEditor(strSP));
    column5.setCellRenderer(new ComboBoxRenderer(strSP));I am sure like the problem with my renderer and editoronly,but i am helpless.
    Please if someone help me to come out of this problem,it will be much helpful for me .
    thanks

    Hi,
    Thanks for u'r reply
    I tried in so many ways.
    I tried with u'r editor,and sun forum examples also.
    I brief what i want.
    I am having table with 3 column.
    The zeroth col, and the 2 col is a combo box.so i am rendering.
    when i choose a one from zeroth col combo Box ,the 2nd col ComboBox value has to change into YES
    when i choose a apart from one from zeroth col combo Box ,the 2nd col combo Box value has to change into NO.
    Here my Problem is
    When ever i am choosing the particular value from the 1st combo box,it is affecting the all the combobox values below(set of values,not all)..To solve that i kept the commented line in the renderer but it is creating the new problem.
    I am very seriously working to solve this problem,if any one suggest to solve this,it will be very much helpful to me.
    I am posting my code belowimport java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.TableModelEvent;
    import javax.swing.event.TableModelListener;
    import javax.swing.table.*;
    public class TableComboBox extends JFrame implements TableModelListener
         public JTable table;
            DefaultTableModel model = null;
            JComboBox editor2 = null;
         public TableComboBox()
              Object[][] data = { {" ", "A" , " "}, {" ", "B", " "}, {" ", "C", " "}, {" ", "D", " "}, {" ", "E", " "}, {" ", "F", " "}, {" ", "G", " "}, {" ", "H", " "}  };
                    String[] columnNames = {"FIRST","SECOND", "THIRD" };
                    String[] column0Items = { "one", "two", "three", "four" };
                    String column2Items[] = {"YES","NO"};
              model = new DefaultTableModel(data, columnNames);
                    model.addTableModelListener(this);
              table = new JTable(model);
              //  Set the Zeroth column to use a combobox as its editor,renderer
                    table.getColumnModel().getColumn(0).setCellRenderer(new ComboBoxRenderer(column0Items));
              table.getColumnModel().getColumn(0).setCellEditor(new ComboBoxEditor(column0Items));
                    //  Set the second column to use a combobox as its editor,renderer
                    table.getColumnModel().getColumn(2).setCellRenderer(new ComboBoxRenderer(column2Items));
              table.getColumnModel().getColumn(2).setCellEditor(new ComboBoxEditor(column2Items));
                    JScrollPane scrollPane = new JScrollPane( table );
              getContentPane().add( scrollPane );
             public void tableChanged(TableModelEvent e) {
                    int row = e.getFirstRow();
                    int column = e.getColumn();
                    if(e.getType() == TableModelEvent.INSERT) {
                    if (e.getType() == TableModelEvent.UPDATE) {
                            if(table.getEditingRow() != table.getSelectedRow())
                                    ((DefaultCellEditor)table.getCellEditor()).cancelCellEditing();                      
                   if ( column == 0 ) {
                                    if(model.getValueAt(row, 0).equals("one")) {
                                            model.setValueAt("YES", row, 2);
                                    } else if(model.getValueAt(row, 0).equals("two")){
                                            model.setValueAt("NO", row, 2);
                                    } else if(model.getValueAt(row, 0) == "three"){
                                            model.setValueAt("NO", row, 2);
                                    } else if(model.getValueAt(row, 0) == "four"){
                                            model.setValueAt("NO", row, 2);
                           }else{
                                    //do nothing
         public static void main(String[] args)
              final TableComboBox frame = new TableComboBox();
              frame.setDefaultCloseOperation( EXIT_ON_CLOSE );
              frame.pack();
              frame.setVisible(true);
            class ComboBoxRenderer extends JComboBox implements TableCellRenderer {
                    String items[];
                    public ComboBoxRenderer(String[] items) {
                                    super(items);
                                    this.items = items;
                    public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
                                   if(isSelected){
                                            setSelectedItem(value.toString());
                                            return this;
                                    }/*else{
                                            setSelectedItem(items[0]));
                            return this;
            class ComboBoxEditor extends DefaultCellEditor {
                    public ComboBoxEditor(String[] items) {
                           super(new JComboBox(items));
            }

  • Problem with JTable and JComboBoxes in cells

    Hello,
    I've build a Table with static comboboxes in the first row. These comboboxes are static because they are used to filter the content of the table.
    I extended AbstractTableModel for the data handling and I use the DefaultCellRenderer for combobox handling.
    So far everything works fine. But if I gain focus to one combobox and then click to another cell (either table cell or another combobox) i receive a NullPointerException from within the component:
    java.lang.NullPointerException
         at javax.swing.plaf.basic.BasicTableUI$MouseInputHandler.adjustFocusAndSelection(Unknown Source)
         at javax.swing.plaf.basic.BasicTableUI$MouseInputHandler.mousePressed(Unknown Source)
         at java.awt.AWTEventMulticaster.mousePressed(Unknown Source)
         at java.awt.AWTEventMulticaster.mousePressed(Unknown Source)
         at java.awt.Component.processMouseEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Window.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)The problem is, that no error is visible on client side! I just see the NullPointerException in my console but no GUI Errors occur.
    Actually I could leave the table as it is now because there are no obvious errors but I don't think its a good job to ignore exceptions.
    Does anyone see where this problem could come from????
    Do I have to extend the BasicTableUI somehow because the exception is thrown in there???
    Thanks for any help!
    Bye Jan

    Hi brad,
    I'm using eclipse and java1.4.2_06. Isn't it enough to write the program arguments to the run configuration in eclipse?!
    I tried that but it didn't work out, I get the same error msg. :(
    But I can say that whatever happens inside the UI, the exception is thrown before I receive a mouseClicked event on the table itself. I added some kind of dummy mouse listener to the table that only prints the events to the console. Is the cell renderer or cell editor using is own MouseAdapter?
    You said: ...consume the event so the table won't react....
    How could I catch this MouseInputHandler???
    Thanx!
    Jan

  • Problem with Background image and JFrame

    Hi there!
    I've the following problem:
    I created a JFrame with an integrated JPanel. In this JFrame I display a background image. Therefore I've used my own contentPane:
    public class MContentPane extends JComponent{
    private Image backgroundImage = null;
    public MContentPane() {
    super();
    * Returns the background image
    * @return Background image
    public Image getBackgroundImage() {
    return backgroundImage;
    * Sets the background image
    * @param backgroundImage Background image
    public void setBackgroundImage(Image backgroundImage) {
    this.backgroundImage = backgroundImage;
    * Overrides the painting to display a background image
    protected void paintComponent(Graphics g) {
    if (isOpaque()) {
    g.setColor(getBackground());
    g.fillRect(0, 0, getWidth(), getHeight());
    if (backgroundImage != null) {
    g.drawImage(backgroundImage,0,0,this);
    super.paintComponent(g);
    Now the background image displays correct. But as soon as I click on some combobox that is placed within the integrated JPanel I see fractals of the opened combobox on the background. When I minimize
    the Frame they disappear. Sometimes though I get also some fractals when resizing the JFrame.
    It seems there is some problem with the redrawing of the background e.g. it doesn't get redrawn as often as it should be!?
    Could anyone give me some hint, on how to achieve a clear background after clicking some combobox?
    Thx in advance

    I still prefer using a border to draw a background image:
    import java.awt.*;
    import java.awt.image.*;
    import javax.swing.border.*;
    public class CentredBackgroundBorder implements Border {
        private final BufferedImage image;
        public CentredBackgroundBorder(BufferedImage image) {
            this.image = image;
        public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) {
            int x0 = x + (width-image.getWidth())/2;
            int y0 = y + (height-image.getHeight())/2;
            g. drawImage(image, x0, y0, null);
        public Insets getBorderInsets(Component c) {
            return new Insets(0,0,0,0);
        public boolean isBorderOpaque() {
            return true;
    }And here is a demo where I load the background image asynchronously, so that I can launch the GUI before the image is done loading. Warning: you may find the image disturbing...
    import java.awt.*;
    import java.io.*;
    import java.net.URL;
    import javax.imageio.*;
    import javax.swing.*;
    import javax.swing.border.*;
    public class BackgroundBorderExample {
        public static void main(String[] args) throws IOException {
            JFrame.setDefaultLookAndFeelDecorated(true);
            JFrame f = new JFrame("BackgroundBorderExample");
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            JTextArea area = new JTextArea(24,80);
            area.setForeground(Color.WHITE);
            area.setOpaque(false);
            area.read(new FileReader(new File("BackgroundBorderExample.java")), null);
            final JScrollPane sp = new JScrollPane(area);
            sp.setBackground(Color.BLACK);
            sp.getViewport().setOpaque(false);
            f.getContentPane().add(sp);
            f.setSize(600,400);
            f.setLocationRelativeTo(null);
            f.setVisible(true);
            String url = "http://today.java.net/jag/bio/JagHeadshot.jpg";
            final Border bkgrnd = new CentredBackgroundBorder(ImageIO.read(new URL(url)));
            Runnable r = new Runnable() {
                public void run() {
                    sp.setViewportBorder(bkgrnd);
                    sp.repaint();
            SwingUtilities.invokeLater(r);
    }

  • Problem with JComboBox in aTable Cell

    I try to put JComboBox in JTableCell,
    what i want to do is something like this...
    Question | Answer |
    1. what is your favourite | a. Pizza |
    food? | b. Hot Dog |
    2. what is your favourite | a. red |
    color? | b. blue |
    Object[][] data = {
    {"1.What is your favourite food?", new AnswerChoices(new String[]{"a.Pizza","b.Hot Dog"})},
    {"2.What is your favourite color?", new AnswerChoices(new String[]{"a.red","b.blue"})}
    here my code;
    //class AnswerChoicesCellEditor
    import javax.swing.table.*;
    import javax.swing.*;
    import java.awt.Component;
    import java.awt.event.MouseEvent;
    import java.util.EventObject;
    import de.falcom.table.*;
    public class AnswerChoicesCellEditor extends AbstractCellEditor implements TableCellEditor{
         protected JComboBox mComboBox;
    public AnswerChoicesCellEditor(){
         mComboBox = new JComboBox();
         mComboBox.addActionListener(this);
         mComboBox.setEditable(false);
    public Component getTableCellEditorComponent(JTable table,Object value,boolean isSelected,int row,int column){
         if(value instanceof AnswerChoices){
              AnswerChoices a = (AnswerChoices)value;
              String[] c = a.getChoices();
              mComboBox.removeAllItems();
              for(int i=0; i < c.length; i++)
                   mComboBox.addItem(c);
                   mComboBox.setSelectedIndex(a.getAnswer());
         return mComboBox;
    public Object getCellEditorValue(){
         int nchoices = mComboBox.getItemCount();
         String[] c = new String[nchoices];
         for(int i = 0; i<nchoices; i++){
              c[i] = mComboBox.getItemAt(i).toString();
         return new AnswerChoices(c,mComboBox.getSelectedIndex());
         //return mComboBox.getSelectedItem(); //here i get but after selection there is no comboBox in tableCell
    //the Renderer class
    import javax.swing.table.TableCellRenderer;
    import javax.swing.*;
    import java.awt.Component;
    public class AnswerChoicesCellRenderer extends JComboBox implements TableCellRenderer {
         private Object curValue;
    /** Creates new AnswerChoiceCellRenderer */
    public AnswerChoicesCellRenderer() {
    setEditable(false);
    public Component getTableCellRendererComponent(JTable table,Object value,boolean isSelected,boolean hasFocus,int row,int column) {
    if (value instanceof AnswerChoices) {
    AnswerChoices nl = (AnswerChoices)value;
    String[] tList = nl.getChoices();
    if (tList != null) {
    removeAllItems();
    for (int i=0; i<tList.length; i++)
    addItem(tList[i]);
         setSelectedIndex(AnswerChoices.getAnswer());
         //this.setSelectedItem();
    //return this;
    //this.getTableCellRendererComponent(table,value,isSelected,hasFocus,row,column);
    if (table != null)
    if (table.isCellEditable(row, column))
    setForeground(CellRendererConstants.EDITABLE_COLOR);
    else
    setForeground(CellRendererConstants.UNEDITABLE_COLOR);
              setBackground(table.getBackground());
    return this;
    public class AnswerChoices {
         static int ans = 0;
         String[] choices ;
    public AnswerChoices(String[]c,int a){
              choices = c;
              ans          = a;
    public AnswerChoices(String[] c){
              this(c,0);
    public String[] getChoices(){
         return choices;
    public void setAnswer(int a){
         ans = a;
    public static int getAnswer(){
         return ans;
    //the TableModel i used in my app
    import java.awt.Color;
    import javax.swing.JTable;
    import javax.swing.ListSelectionModel;
    import javax.swing.table.DefaultTableModel;
    import javax.swing.table.TableCellEditor;
    import javax.swing.table.TableCellRenderer;
    import javax.swing.table.TableColumn;
    import javax.swing.table.TableModel;
    import javax.swing.*;
    public class FAL_Table extends JTable {
    /** Creates new FAL_Table */
    public FAL_Table(DefaultTableModel dtm) {
    super(dtm);
    setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    setRowSelectionAllowed(false);
    setColumnSelectionAllowed(false);
    setBackground(java.awt.Color.white);
    setDefaultCellEditorRenderer();
    private void setDefaultCellEditorRenderer(Class forClass, TableCellEditor editor, TableCellRenderer renderer) {
         setDefaultEditor(forClass, editor);
         setDefaultRenderer(forClass, renderer);
         private void setDefaultCellEditorRenderer() {
              // Setting default editor&renderer of Boolean
              setDefaultCellEditorRenderer(Boolean.class, new BooleanCellEditor(), new BooleanCellRenderer());
              //Setting default editor&renderer of ComboBox
              setDefaultCellEditorRenderer(JComboBox.class, new ComboBoxCellEditor( ),new ComboBoxRenderer());
              // Number class
              // Setting default editor&renderer of java.math.BigDecimal
              setDefaultCellEditorRenderer(java.math.BigDecimal.class,new NumberCellEditor(), new NumberCellRenderer());
              // Setting default editor&renderer of java.math.BigInteger
              setDefaultCellEditorRenderer(java.math.BigInteger.class,new NumberCellEditor(), new NumberCellRenderer());
              // Setting default editor&renderer of java.lang.Byte
              setDefaultCellEditorRenderer(Byte.class,new NumberCellEditor(), new NumberCellRenderer());
              // Setting default editor&renderer of Double
              setDefaultCellEditorRenderer(Double.class,new NumberCellEditor(), new NumberCellRenderer());
              // Setting default editor&renderer of Float
              setDefaultCellEditorRenderer(Float.class,new NumberCellEditor(), new NumberCellRenderer());
              // Setting default editor&renderer of Integer
              setDefaultCellEditorRenderer(Integer.class,new NumberCellEditor(), new NumberCellRenderer());
              // Setting default editor&renderer of Long
              setDefaultCellEditorRenderer(Long.class,new NumberCellEditor(), new NumberCellRenderer());
              // Setting default editor&renderer of Short
              setDefaultCellEditorRenderer(Short.class,new NumberCellEditor(), new NumberCellRenderer());
              // Setting default editor&renderer of String
              setDefaultCellEditorRenderer(String.class,new StringCellEditor(), new StringCellRenderer());
              // Setting default editor&renderer of FileName
              setDefaultCellEditorRenderer(FileName.class,new FileNameCellEditor(), new FileNameCellRenderer());
              // Setting default editor&renderer of Color
              setDefaultCellEditorRenderer(Color.class,new ColorCellEditor(), new ColorCellRenderer());
              setDefaultCellEditorRenderer(AnswerChoices.class, new AnswerChoicesCellEditor(), new AnswerChoicesCellRenderer());
              setDefaultCellEditorRenderer(JSpinner.class, new SpinnerCellEditor(), new SpinnerRenderer());
    public Class getCellClass(int row,int col) {
    TableModel model = getModel();
    if (model instanceof FAL_TableModel) {
    FAL_TableModel ptm = (FAL_TableModel)model;
    return ptm.getCellClass(row,convertColumnIndexToModel(col));
    return model.getColumnClass(convertColumnIndexToModel(col));
    public TableCellRenderer getCellRenderer(int row, int column) {
    TableColumn tableColumn = getColumnModel().getColumn(column);
    TableCellRenderer renderer = tableColumn.getCellRenderer();
    if (renderer == null) {
    renderer = getDefaultRenderer(getCellClass(row,column));
    return renderer;
    public TableCellEditor getCellEditor(int row, int column) {
    TableColumn tableColumn = getColumnModel().getColumn(column);
    TableCellEditor editor = tableColumn.getCellEditor();
    if (editor == null) {
    editor = getDefaultEditor(getCellClass(row,column));
    return editor;
    import javax.swing.table.*;
    import java.util.Vector;
    import java.awt.event.MouseEvent;
    import java.util.EventObject;
    public class FAL_TableModel extends DefaultTableModel implements TableModel {
    public FAL_TableModel() {
    this((Vector)null, 0);
    public FAL_TableModel(int numRows, int numColumns) {
    super(numRows,numColumns);
    public FAL_TableModel(Vector columnNames, int numRows) {
    super(columnNames,numRows);
    public FAL_TableModel(Object[] columnNames, int numRows) {
    super(convertToVector(columnNames), numRows);
    public FAL_TableModel(Vector data, Vector columnNames) {
    setDataVector(data, columnNames);
    public FAL_TableModel(Object[][] data, Object[] columnNames) {
    setDataVector(data, columnNames);
         public boolean isCellEditable(int row, int col) {
    //Note that the data/cell address is constant,
    //no matter where the cell appears onscreen.
    Object obj = getValueAt(row,col);
    if (col != 1){
    return false;
         }else{
              return true;
    public Class getCellClass(int row,int col) {
    Object obj = getValueAt(row,col);
    if (obj != null)
         return obj.getClass();
         else
         return Object.class;
    public Object getCellValue(int row,int col) {
    Object obj = getValueAt(row,col);
              return obj;      
    my problem is, when i select an item from one of the comboBox in the table the value of the other cells changes too and i have the same problem with JSpinner.
    please help i am stuck
    Gebi

    and when i try to get the current value oa a cell it returns the Component class like this
    AnswerChoices@bf1f20 ...

  • Problem with checkbox on table component

    Hello i am having a problem with checkbox in table component
    i am developing something like a shopping cart app and i have a checkbox in my table component , i want users to select items from the checkbox to add to thier cart, They can select the items from cartegory combobox , my problem is when they select the items from the checkbox if they select another category the alread selected once do not display in my collection opbject please how can i maintain the state of the already selected items in my collection object

    Hi,
    Please go through the tutorial "Understanding scope and managed beans". This is available at:
    http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/scopes.html
    The details of the selected items need to be stored in an object that is in session scope.
    Hope this helps
    Cheers
    Girish

  • Performance Problems with UI Element Tabstrip and IE

    Hi,
    I use the UI Element "Tabstrip" in a Java Web Dynpro Application. The application gets slower the more I jump from one tab to the next. All the other UI Elements (e.g. ComboBox, TextField) are affected, too.
    A system trace on the Web AS seems to indicate that it is a client problem.
    We are using the Internet Explorer 6.0.2900.2180 XP SP2 and the J2EE Engine 6.40.
    It seems to be a problem with the Tabstrip element in combination with the IE (Firefox 3 works fine). We created a test application with only the tabstrip element, three tabs, and a combo box. After several clicks on the tabs, the test application gets slower...
    Does anyone has had the same problem with the tabstrips, or anyone an idea what might be the reason??
    Thanks,
    Sabine

    Open an OSS message (BC-WD-UR).
    Armin

  • Problems with multiple TestStand versions on the same computer

    I installed LabVIEW 2014 and TestStand 2014; then later I installed TestStand 2010 SP1 and have been using it since.  (I also updated LabVIEW 2014 to 14.0f1; I think I did that after installing TestStand 2010 SP1.)  Is this "legal?"  I have been seeing strange behavior with TestStand 2010 SP1:
    - if I type in any expression text boxes in the Sequence Editor (e.g., for a pre-expression), I periodically get an error dialog as I type:
     "The .NET support dll could not be loaded.  This is caused by an assembly path that could not be resolved.  Error Code: -18700, The .NET support dll could not be loaded.  This is caused by an assembly path that could not be resolved! Source: 'TSAPI'
    After I acknowledging the dialog, I can contine to type a little more before getting the dialog again, but it doesn't seem to invalidate anything I type.
    - If I open the Simple LabVIEW Simple User Interface that ships with TestStand 2014 while TestStand 2010 SP1 is active, LabVIEW immediately crashes.  I can open all the subVIs without a problem, but the top-level VI always crashes LabVIEW.
    So I used the TestStand Version Switcher to make TestStand 2014 active, opened the top-level Simple UI VI, and deleted all the UI controls.  Then I switched back to TestStand 2010 SP1, and then I was able to open the top-level VI.  I added back the TestStand UI controls to the VI, and now the VI runs.  But many operations return a TestStand error dialog, such as Close Execution ("Value invalid or out of range [Error Code: -17300]"), Logout ("Cannot find item to select in ComboBox [Error Code: -2147467259]"), and (critically) Exit ("Operation Failed.  Error Code: -17500]") and the X in the upper right corner of the window ("Operation Failed.  Unknown System Error in <VI name>").  So I can't exit without killing LabVIEW.
    These two issues may be unrelated.  But maybe installing an older version of TS after installing a newer version is not a valid use case?  Is the ActiveX error a result of this?  Should it be possible to use a (simple) UI written for a newer version of TestStand be able to work with an older version of TestStand?
    I have another issue that is probably unrelated, but I'll bring it up here just for completeness.  If I right-click on a LV property node or invoke node for a property or method from the TS API and ask for help for the property or method, a command window flashes briefly before showing the TS help window with the top-level item selected (i.e., it doesn't take me to the help for the selected property or method).  I have this problem with either version of TS active, and I saw this problem even before I installed TS 2010 SP1.  I seem to recall having this problem once before, but I can't find the solution.  I don't know if this problem is an indication of some other larger problem.
    For what it's worth, I am running WIndows 8.1 on a virtual machine.

    Thanks for the information, Doug.  Maybe the ActiveX error dialog I get while in the sequence editor is related to the fact that I'm running an unsupported operating system.
    So using a UI that was created in a newer version of TS is not supposed to be able to run with an older version of TS.  Is there any way to enforce this (like having a dialog appear informing you of the incompatibility when the TS engine is loaded) and avoid an immediate crash?  (Maybe the crash has to do with the incomaptible OS as well.)
    Is there a way to "relink" a UI to an older version of TestStand?  Can you just relink all the ActiveX reference controls/constants to the TS ActiveX servers?  As far as I can tell, everything I am trying to do with the new TS version should work with the old version.  And also, as far as I can tell, the TS version switcher changes the version of the available ActiveX server; so unless my UI uses a feature unavailable in older TS versions, I would think it shouldn't know the difference.  (I'm making a lot of assumptions in that last statement, so I may be totally wrong here.)
    Thanks,
    Jeff

  • Problem with variable

    Hi. I'm making a form for work for people to book places on
    training courses. Having an annoying problem with variables that
    i'm hoping has a simple solution. Any help with this will be much
    appreciated.
    All the info is held in an external text file which looks
    like this (but much longer):
    &totalcourses=2&
    &course0=Please choose a course&
    &course1=my course one&
    &totaldates1=3&
    &c1date0=Select a date...&
    &c1date1=15 September 2006&
    &c1time1=Time: 10:00 to 16:00&
    &c1date2=23 January 2006&
    &c1time2=Time: 11:00 to 16:00&
    &c1date3=28 February 2007&
    &c1time3=Time: 12:00 to 16:00&
    &course2=my course 2&
    &totaldates2=3&
    &c2date0=Select a date...&
    &c2date1=15 September 2006&
    &c2time1=Time: 11:00 to 16:00&
    &c2date2=08 January 2007&
    &c2time2=Time: 9:00 to 16:00 &
    &c2date3=15 February 2007
    &c2time3=Time: 12:00 to 16:00&
    The course titles are loaded into an array and then into a
    combobox. When a course is chosen a second combobox loads the
    relevant dates array for that course. When a date is chosen the
    time is shown in a dynamic text box.
    Problem is - if more than one course is on the same date it
    will show the time for the latest course with that date. For
    example - course 1 is on 15 sept at time 10:00 to 16:00, course 2
    is also on 15 sept at time 11:00 to 16:00. When 15 Sept is chosen
    for course one it displays the time for course 2 on this date -
    presumably because it comes later in the text file.
    I've attached the actionscript for this - Can anyone help me
    sort this out??

    Hi. I'm making a form for work for people to book places on
    training courses. Having an annoying problem with variables that
    i'm hoping has a simple solution. Any help with this will be much
    appreciated.
    All the info is held in an external text file which looks
    like this (but much longer):
    &totalcourses=2&
    &course0=Please choose a course&
    &course1=my course one&
    &totaldates1=3&
    &c1date0=Select a date...&
    &c1date1=15 September 2006&
    &c1time1=Time: 10:00 to 16:00&
    &c1date2=23 January 2006&
    &c1time2=Time: 11:00 to 16:00&
    &c1date3=28 February 2007&
    &c1time3=Time: 12:00 to 16:00&
    &course2=my course 2&
    &totaldates2=3&
    &c2date0=Select a date...&
    &c2date1=15 September 2006&
    &c2time1=Time: 11:00 to 16:00&
    &c2date2=08 January 2007&
    &c2time2=Time: 9:00 to 16:00 &
    &c2date3=15 February 2007
    &c2time3=Time: 12:00 to 16:00&
    The course titles are loaded into an array and then into a
    combobox. When a course is chosen a second combobox loads the
    relevant dates array for that course. When a date is chosen the
    time is shown in a dynamic text box.
    Problem is - if more than one course is on the same date it
    will show the time for the latest course with that date. For
    example - course 1 is on 15 sept at time 10:00 to 16:00, course 2
    is also on 15 sept at time 11:00 to 16:00. When 15 Sept is chosen
    for course one it displays the time for course 2 on this date -
    presumably because it comes later in the text file.
    I've attached the actionscript for this - Can anyone help me
    sort this out??

Maybe you are looking for

  • When I play a movie through iTunes, audio has no issues but video stutters and skips

    Hey everyone, I have a Dell 17R, Windows 8 64 bit, intel i7-3630QM at 2.4 GHZ, 8gb ram, Nvidia GT-650M at 1920x1080 using driver 320.49 When I play a movie in iTunes, the audio works flawlessly but the video will be smooth for a few seconds, stutter

  • Cannot create ringtones....

    how come very time I try to make one of my itunes purchased songs into a ringtone it always says that the song can no longer be made into a ringtone? --JD

  • Skype 7.4 keeps crashing

    Skype keeps crashing on my laptop. I know its skype because it only happens when skype is on. As long as skype isn't running on my computer it can stay up for days. I only last a few hours if skype is open. 7.4.64.102 is my skype version. I don't thi

  • How to get order status from co03

    Hello Gurus, Please tell me is there any fuction module available to get status of order from CO03 or any link that will help to get status... Thanking you, Gaurav

  • Links stripped when I convert to pdf

    Hi, I keep trying to export my document to a PDF file, but it strips all of the links (except 2) out of my document. I've tried to do it a second and third time with the same results. Any thoughts? I've just noticed the problem since updating a coupl