Reg - 'F1' key event in Combo box

Hi,
Requirement:
      I have requirement that to launch a browser window on press of 'F1' key while the movie (swf) has focus. I did it and working fine for me in web application.
Problem statement:
      When a movie had been launched and having focus in 'Combo box' (which has list of items starts with A to Z letters) control then, i pressed 'F1' key but the browser window has not been launched, instead 'Combo box's key action event get fired and the item starts with the letter 'P' has been selected in the combo box list. If now again i press 'F1' key the browser window has launched as per my requirement.
      This behavior is happening whenever the launched movie has focus in 'Combo box'; otherwise if the focus is on some other control like TextInput etc., no problem for me. One more information, if the Combo box doesn't have any item starts with the letter 'P' then no problem for me.
      I tried to understand the behavior of combo, but still i don't have any clue. Please share your knowledge/thoughts.
Environment:
      Flex builder 3.5
      Adobe flash player 11.2
      Windows XP SP3
Regards,
Mani

Hi,
I just overridden the keydown handler function in ComboBox component to avoid its own event propagation behavior if 'F1' key is pressed and its working fine for me.
Thanks for all,
-Mani

Similar Messages

  • Capturing Enter key event from text box

    In my application, there are a number of text boxes. I want to create a feature where an enter key even is seen and specific function executed depending on which text box was in focus when the enter key was pressed. Currently I am able to capture an enter key event on the whole page. How do I do that specifically for a text box?
    This application is done in HTML, javascript and Adobe AIR.
    Thanks
    Binu
    www.verseview.info

    Hi
    That's true that Flex4.5 SDK under Flash builder Burito doesn't listen Enter key in Text Area for KeyUp or KeyDown event.
    Here I found a work around you can use.
    Add an eventlistener to the component in actionscript and set the useCapture=true next to eventlistener function. Now you can listen enter key for KeyUp or KeyDown Event
    Hope this helps
    Rush-me

  • Key Event Windows dialog box

    I have executed a windows program using
    Runtime = Runtime.getRuntime( );
    Process proc = rt.exec(command);However the program brings up an " an ok message dialog box" which needs click in order for the program to run.
    I have used the Robot class to simulate a Enter key press using the
    robot.keyPress(keyEvent.VK_ENTER);However this does not work because the focus is on the command prompt and not on the windows message window. is there a way round this??
    cheers
    Javamug :)

    I have figured it out, so if any one else has this problem this is the solution.
    Unfortunatley the only way I could do it was by turning to the dark side and using a spot of black magic and voodoo, sorry I mean Windows scripting (.vbs)
    You first have to set the focus of the error title bar Appactive( ) and then use the Sendkeys( ) method to send a simulated enter key press, yuk!!!!!
    If anyone has a better solution please tell
    Regards
    Chris

  • Handling events in combo box

    Hello,
    I'm very much confused about the handling events of JComboBox with ActionListener and ItemListener. Both are seemed similar to me. If anyone can explain me the differences, it would be helpful for me. Thanks everybody.

    ActionEvents are fired each time any item is selected, ItemEvents are only fired, if the selection changes.

  • JComboBox Unable to recieve key events

    Hello,
    I have a Table which contains multiple editors and multiple renderers for different items that may or may not be added in the table. I have added a KeySelectionManager to the ComboBox class that I have defined. When I add this Combo box to a Frame/Panel listener recieves key board events, but when I add the combox box to a table which has other components and listeners, the combo box listener is not getting any events.
    How do I tell table to send the event to combo box?
    Praveen

    I didnot write the code. I am trying to add some enhancements to it. Basically I want the Combo box to scroll as I enter the text.
    Coming to your question...All the data I have is in another class and I am using the table.setModel(obj) where obj is the Object in which I have data. After setting the model, I am registering the editors and renderers for table.
    Please point to me any good tutorial on how the setModel works. I can see that while initializing the editors, there is a call made to the ComboBox class. May be this is where the ComboBox is getting created.
    Does this reply makes some sense?
    Thanks for your reply,
    Praveen

  • Need to detect when an item is clicked in a combo box in flex 3

    Hello
    I am having a check box and a combo box whenever any selection is made in combo box (current selection may be same as previous selection), I need to select the check box.
    By default the 1st item in combo box is selected and check box is unselected. Now I want that while 1st item is clicked in combo box (although it is selected) , the check box must be selected.
    I have currently used the change event of combo box to do my task. But it is not working if I click on same item as selected item in combo box.
    Also, I thought to use close event of combo box, but that event dispatches in 4 situations out of which I can distinguish only 1 situation from DropDownEvent(for close).
    Please help me regarding this.
    I am using flex sdk 3.5
    Thanks in advance.

    You can use the Close Event to distinguish it.
    To pull out which item has been selected in the combo box, you use the code (in as3)
    ComboBox(event.target).selectedItem.label
    and through the the use of an if statement
    if (ComboBox(event.target).selectedItem.label == "labelName")
    you can distinguish the single situation from the others.

  • How to populate data in the data table on combo box change event

    hi
    i am deepak .
    i am very new to JSF.
    my problem is i want to populate data in the datatable on the combo box change event.
    for example ---
    combo box has name of the city. when i will select a city
    the details of the city should populate in the datatable. and if i will select another city then the datatable should change accordingly..
    its urgent
    reply as soon as possible
    thanks in advance

    i am using Rational Application Developer to develop my application.
    i am using a combo box and i am assigning cityName from the SDO.
    and i am declaring a variable in the pageCode eg.
    private String cityName;
    public void setCityName(String cityName){
    this.cityName = cityName;
    public String getCityName(){
    return cityName;
    <h:selectOneMenu id="menu1" styleClass="selectOneMenu" value="#{pc_Test1.loginID}" valueChangeListener="#{pc_Test1.handleMenu1ValueChange}">
                        <f:selectItems
                             value="#{selectitems.pc_Test1.usercombo.LOGINID.LOGINID.toArray}" />
                   </h:selectOneMenu>
                   <hx:behavior event="onchange" target="menu1" behaviorAction="get"
                        targetAction="box1"></hx:behavior>
    and also i am declaring a requestParam type variable named city;
    and at the onChangeEvent i am writing the code
    public void handleMenu1ValueChange(ValueChangeEvent valueChangedEvent) {
    FacesContext context = FacesContext.getCurrentInstance();
    Map requestScope = ext.getApplication().createValueBinding("#{requestScope}").getValue(context);
    requestScope.put("login",(String)valueChangedEvent.getNewValue());
    and also i am creating another SDO which is used to populate data in datatable and in this SDO in the where clause i am using that requestParam .
    it is assigning value in the pageCode variable and in the requestParam but it is not populating the dataTable. i don't no why??
    it is possible that i may not clear at this point.
    please send me the way how my problem can be solved.
    thanks in advance

  • Adding an event listener to combo box

    I am working on a mortgage calculator and I cannot figure out how to add an event listener to a combo box.
    I want to get the mortgage term and interest rate to calucate the mortgage using the combo cox. Here is my program.
    Modify the mortgage program to allow the user to input the amount of a mortgage
    and then select from a menu of mortgage loans: 7 year at 5.35%, 15 year at 5.50%, and
    30 year at 5.75%. Use an array for the different loans. Display the mortgage payment
    amount. Then, list the loan balance and interest paid for each payment over the term
    of the loan. Allow the user to loop back and enter a new amount and make a new
    selection, with resulting new values. Allow user to exit if running as an application
    (can't do that for an applet though).
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.event.*;
    import java.text.NumberFormat;
    import java.util.Locale;
    //creates class MortgageCalculator
    public class MortgageCalculator extends JFrame implements ActionListener {
    //creates title for calculator
         JPanel row = new JPanel();
         JLabel mortgageCalculator = new JLabel("MORTGAGE CALCULATOR", JLabel.CENTER);
    //creates labels and text fields for amount entered          
         JPanel firstRow = new JPanel(new GridLayout(3,1,1,1));
         JLabel mortgageLabel = new JLabel("Mortgage Payment $", JLabel.LEFT);
         JTextField mortgageAmount = new JTextField(10);
         JPanel secondRow = new JPanel();
         JLabel termLabel = new JLabel("Mortgage Term/Interest Rate", JLabel.LEFT);
         String[] term = {"7", "15", "30"};
         JComboBox mortgageTerm = new JComboBox(term);
         JPanel thirdRow = new JPanel();
         JLabel interestLabel = new JLabel("Interest Rate (%)", JLabel.LEFT);
         String[] interest = {"5.35", "5.50", "5.75"};
         JComboBox interestRate = new JComboBox(interest);
         JPanel fourthRow = new JPanel(new GridLayout(3, 2, 10, 10));
         JLabel paymentLabel = new JLabel("Monthly Payment $", JLabel.LEFT);
         JTextField monthlyPayment = new JTextField(10);
    //create buttons to calculate payment and clear fields
         JPanel fifthRow = new JPanel(new GridLayout(3, 2, 1, 1));
         JButton calculateButton = new JButton("CALCULATE PAYMENT");
         JButton clearButton = new JButton("CLEAR");
         JButton exitButton = new JButton("EXIT");
    //Display area
         JPanel sixthRow = new JPanel(new GridLayout(2, 2, 10, 10));
         JLabel displayArea = new JLabel(" ", JLabel.LEFT);
         JTextArea textarea = new JTextArea(" ", 8, 50);
    public MortgageCalculator() {
         super("Mortgage Calculator");                     //title of frame
         setSize(550, 350);                                             //size of frame
         setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         Container pane = getContentPane();
         GridLayout grid = new GridLayout(7, 3, 10, 10);
         pane.setLayout(grid);
         pane.add(row);
         pane.add(mortgageCalculator);
         pane.add(firstRow);
         pane.add(mortgageLabel);
         pane.add(mortgageAmount);
         pane.add(secondRow);
         pane.add(termLabel);
         pane.add(mortgageTerm);
         pane.add(thirdRow);
         pane.add(interestLabel);
         pane.add(interestRate);
         pane.add(fourthRow);
         pane.add(paymentLabel);
         pane.add(monthlyPayment);
         monthlyPayment.setEnabled(false);
         pane.add(fifthRow);
         pane.add(calculateButton);
         pane.add(clearButton);
         pane.add(exitButton);
         pane.add(sixthRow);
         pane.add(textarea); //adds texaarea to frame
         pane.add(displayArea);
         setContentPane(pane);
         setVisible(true);
         //Adds Listener to buttons
         calculateButton.addActionListener(this);
         clearButton.addActionListener(this);
         exitButton.addActionListener(this);
         mortgageTerm.addActionListener(this);
         interestRate.addActionListener(this);
    public void actionPerformed(ActionEvent event) { 
         Object command = event.getSource();
         JComboBox mortgageTerm = (JComboBox)event.getSource();
         String termYear = (String)mortgageTerm.getSelectedItem();
    if (command == calculateButton) //calculates mortgage payment
         int year = Integer.parseInt(mortgageTerm.getText());
         double rate = new Double(interestRate.getText()).doubleValue();
         double mortgage = new Double(mortgageAmount.getText()).doubleValue();
         double interest = rate /100.0 / 12.0;
         double monthly = mortgage *(interest/(1-Math.pow(interest+1,-12.0 * year)));
                   NumberFormat myCurrencyFormatter;
                   myCurrencyFormatter = NumberFormat.getCurrencyInstance(Locale.US);
                   monthlyPayment.setText(myCurrencyFormatter.format(monthly));
         if(command == clearButton) //clears all text fields
                   mortgageAmount.setText(null);
                   //mortgageTerm.setText(null);
                   //interestRate.setText(null);
                   monthlyPayment.setText(null);
              if(command == exitButton) //sets exit button
                        System.exit(0);
         public static void main(String[] arguments) {
              MortgageCalculator mor = new MortgageCalculator();

    The OP already did this to both JComboBoxes.
    mochatay, here is a new actionPerformed method for you to use.
    I've improved a few things here and there...
    1) You can't just cast the ActionEvent's source into a JComboBox!
    What if it was a JButton that fired the event? Then you would get ClassCastExceptions (I'm sure you did)
    So check for all options, what the source of the ActionEvent actually was...
    2) You can't assume the user will always type in valid data.
    So enclose the Integer and Double parse methods in try-catch brakcets.
    Then you can do something when you know that the user has entered invalid input
    (like tell him/her what a clumsy idiot they are !)
    3) As soon as user presses an item in any JComboBox, just re-calculate.
    I did this here by programmatically clicking the 'Calculate' button.
    Alternatively, you could have a 'calculate' method, which does everything inside the
    if(command==calculateButton) if-block.
    This will be called when:
    a)calculateButton is pressed
    b)when either of the JComboBoxes are pressed.
    public void actionPerformed (ActionEvent event)
            Object command = event.getSource ();
            if (command == calculateButton) //calculates mortgage payment
                int year = 0;
                double rate = 0;
                double mortgage = 0;
                double interest = 0;
                /* If user has input invalid data, tell him so
                and return (Exit from this method back to where we were before */
                try
                    year = Integer.parseInt (mortgageTerm.getSelectedItem ().toString ());
                    rate = new Double (interestRate.getSelectedItem ().toString ()).doubleValue ();
                    mortgage = new Double (mortgageAmount.getText ()).doubleValue ();
                    interest = rate / 100.0 / 12.0;
                catch (NumberFormatException nfe)
                    /* Display a message Dialogue box with a message */
                    JOptionPane.showMessageDialog (this, "Error! Invalid input!");
                    return;
                double monthly = mortgage * (interest / (1 - Math.pow (interest + 1, -12.0 * year)));
                NumberFormat myCurrencyFormatter;
                myCurrencyFormatter = NumberFormat.getCurrencyInstance (Locale.US);
                monthlyPayment.setText (myCurrencyFormatter.format (monthly));
            else if (command == clearButton) //clears all text fields
                /* Better than setting it to null (I think) */
                mortgageAmount.setText ("");
                //mortgageTerm.setText(null);
                //interestRate.setText(null);
                monthlyPayment.setText ("");
            else if (command == exitButton) //sets exit button
                System.exit (0);
            else if (command == mortgageTerm)
                /* Programmatically 'clicks' the button,
                As is user had clicked it */
                calculateButton.doClick ();
            else if (command == interestRate)
                calculateButton.doClick ();
            //JComboBox mortgageTerm = (JComboBox) event.getSource ();
            //String termYear = (String) mortgageTerm.getSelectedItem ();
        }Hope this solves your problems.
    I also hope you'll be able to learn from what I've indicated, so you can use similar things yourself
    in future!
    Regards,
    lutha

  • Problem in event handling of combo box in JTable cell

    Hi,
    I have a combo box as an editor for a column cells in JTable. I have a event listener for this combo box. When ever I click on the JTable cell whose editor is combo box,
    I get the following exception,
    Exception occurred during event dispatching:
    java.lang.NullPointerException
         at javax.swing.plaf.basic.BasicTableUI$MouseInputHandler.setDispatchComponent(Unknown Source)
         at javax.swing.plaf.basic.BasicTableUI$MouseInputHandler.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.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.run(Unknown Source)
    Can any one tell me how to over come this problem.
    Thanks,
    Raghu

    Here's an example of the model I used in my JTable. I've placed 2 comboBoxes with no problems.
    Hope this helps.
    public class FileModel5 extends AbstractTableModel
    public boolean isEditable = false;
    protected static int NUM_COLUMNS = 3;
    // initialize number of rows to start out with ...
    protected static int START_NUM_ROWS = 0;
    protected int nextEmptyRow = 0;
    protected int numRows = 0;
    static final public String file = "File";
    static final public String mailName = "Mail Id";
    static final public String postName = "Post Office Id";
    static final public String columnNames[] = {"File", "Mail Id", "Post Office Id"};
    // List of data
    protected Vector data = null;
    public FileModel5()
    data = new Vector();
    public boolean isCellEditable(int rowIndex, int columnIndex)
    // The 2nd & 3rd column or Value field is editable
    if(isEditable)
    if(columnIndex > 0)
    return true;
    return false;
    * JTable uses this method to determine the default renderer/
    * editor for each cell. If we didn't implement this method,
    * then the last column would contain text ("true"/"false"),
    * rather than a check box.
    public Class getColumnClass(int c)
    return getValueAt(0, c).getClass();
    * Retrieves number of columns
    public synchronized int getColumnCount()
    return NUM_COLUMNS;
    * Get a column name
    public String getColumnName(int col)
    return columnNames[col];
    * Retrieves number of records
    public synchronized int getRowCount()
    if (numRows < START_NUM_ROWS)
    return START_NUM_ROWS;
    else
    return numRows;
    * Returns cell information of a record at location row,column
    public synchronized Object getValueAt(int row, int column)
    try
    FileRecord5 p = (FileRecord5)data.elementAt(row);
    switch (column)
    case 0:
    return (String)p.file;
    case 1:
    return (String)p.mailName;
    case 2:
    return (String)p.postName;
    catch (Exception e)
    return "";
    public void setValueAt(Object aValue, int row, int column)
    FileRecord5 arow = (FileRecord5)data.elementAt(row);
    arow.setElementAt((String)aValue, column);
    fireTableCellUpdated(row, column);
    * Returns information of an entire record at location row
    public synchronized FileRecord5 getRecordAt(int row) throws Exception
    try
    return (FileRecord5)data.elementAt(row);
    catch (Exception e)
    throw new Exception("Record not found");
    * Used to add or update a record
    * @param tableRecord
    public synchronized void updateRecord(FileRecord5 tableRecord)
    String file = tableRecord.file;
    FileRecord5 p = null;
    int index = -1;
    boolean found = false;
    boolean addedRow = false;
    int i = 0;
    while (!found && (i < nextEmptyRow))
    p = (FileRecord5)data.elementAt(i);
    if (p.file.equals(file))
    found = true;
    index = i;
    } else
    i++;
    if (found)
    { //update
    data.setElementAt(tableRecord, index);
    else
    if (numRows <= nextEmptyRow)
    //add a row
    numRows++;
    addedRow = true;
    index = nextEmptyRow;
    data.addElement(tableRecord);
    //Notify listeners that the data changed.
    if (addedRow)
    nextEmptyRow++;
    fireTableRowsInserted(index, index);
    else
    fireTableRowsUpdated(index, index);
    * Used to delete a record
    public synchronized void deleteRecord(String file)
    FileRecord5 p = null;
    int index = -1;
    boolean found = false;
    int i = 0;
    while (!found && (i < nextEmptyRow))
    p = (FileRecord5)data.elementAt(i);
    if (p.file.equals(file))
    found = true;
    index = i;
    } else
    i++;
    if (found)
    data.removeElementAt(i);
    nextEmptyRow--;
    numRows--;
    fireTableRowsDeleted(START_NUM_ROWS, numRows);
    * Clears all records
    public synchronized void clear()
    int oldNumRows = numRows;
    numRows = START_NUM_ROWS;
    data.removeAllElements();
    nextEmptyRow = 0;
    if (oldNumRows > START_NUM_ROWS)
    fireTableRowsDeleted(START_NUM_ROWS, oldNumRows - 1);
    fireTableRowsUpdated(0, START_NUM_ROWS - 1);
    * Loads the values into the combo box within the table for mail id
    public void setUpMailColumn(JTable mapTable, ArrayList mailList)
    TableColumn col = mapTable.getColumnModel().getColumn(1);
    javax.swing.JComboBox comboMail = new javax.swing.JComboBox();
    int s = mailList.size();
    for(int i=0; i<s; i++)
    comboMail.addItem(mailList.get(i));
    col.setCellEditor(new DefaultCellEditor(comboMail));
    //Set up tool tips.
    DefaultTableCellRenderer renderer = new DefaultTableCellRenderer();
    renderer.setToolTipText("Click for mail Id list");
    col.setCellRenderer(renderer);
    //Set up tool tip for the mailName column header.
    TableCellRenderer headerRenderer = col.getHeaderRenderer();
    if (headerRenderer instanceof DefaultTableCellRenderer)
    ((DefaultTableCellRenderer)headerRenderer).setToolTipText(
    "Click the Mail Id to see a list of choices");
    * Loads the values into the combo box within the table for post office id
    public void setUpPostColumn(JTable mapTable, ArrayList postList)
    TableColumn col = mapTable.getColumnModel().getColumn(2);
    javax.swing.JComboBox combo = new javax.swing.JComboBox();
    int s = postList.size();
    for(int i=0; i<s; i++)
    combo.addItem(postList.get(i));
    col.setCellEditor(new DefaultCellEditor(combo));
    //Set up tool tips.
    DefaultTableCellRenderer renderer = new DefaultTableCellRenderer();
    renderer.setToolTipText("Click for post office Id list");
    col.setCellRenderer(renderer);
    //Set up tool tip for the mailName column header.
    TableCellRenderer headerRenderer = col.getHeaderRenderer();
    if (headerRenderer instanceof DefaultTableCellRenderer)
    ((DefaultTableCellRenderer)headerRenderer).setToolTipText(
    "Click the Post Office Id to see a list of choices");
    }

  • Combo box, ring and event to modify them runtime

    Hi,
    I attached a picture of the block diagram. Using LV 8.2.1, win XP.
    What I want : User should select from Main Selection, and that brings up new values for strings in the other menus (tried both combo box and menu ring items).
    Teh problem : This block doesn't do that. Why? Looking with probe, I see the event captured and data are ok until the property node. They are not writed and on the front panel I see no difference.
    Thanx
    Attachments:
    double box test.jpg ‏97 KB
    Test doppio ring.vi ‏21 KB

    Slyfer wrote:
    I thought that the code inside the while loop but outside the event structure wasn't care.
    So if I want to do something continuosly (for example continuosly comparing two integer values to have a real-time boolean led indicator on front panel), do I put the code in the middle? This is a bit confusing thinking about the "timeout event"....
    Use the timeout event or put in the middle (=outside event structure but inside while loop.... at which CPU rate is executed?? too fast?) ??
    Just a suggestion. The timeout event for the Event Structure [ES] is equivalent to that of providing a small delay inside the while loop.
    But it is not mandatory. If you dont wire some value to the timeout terminal, but still want to something, like comparison, you can very well put that code outside the ES but inside the while loop. It ll execute.
    Else you can wire a value like 50 or 100 to the timeout terminal [ this gives enough time for the execution of the various codes inside the various events configured for the ES], so that the ES times out for every 50 or 100 ms when none of the other events occurs. If you put your comparison code here, it ll be doing the comparison all the time or whenever the ES waits and crosses the specified ms after an event has happened.
    I hope this gives you a clear idea about eventstructures.
    See the below links for more details on Event Structures.
    http://zone.ni.com/devzone/cda/tut/p/id/3331
    http://zone.ni.com:80/reference/en-XX/help/371361B-01/lvconcepts/using_events_in_labview/
    http://zone.ni.com/reference/en-XX/help/371361B-01/lvhowto/caveatsrecmndtnsevnts/
    - Partha
    LabVIEW - Wires that catch bugs!

  • Action event automatically triggered for combo box

    Hi all,
    I am facing a typical event handling problem for combo box in Swing(Using Net Beans 5.0, jdk 1.4.2)
    While adding items to combo box it is firing action event twice instead of once irrespective of no. of items added to it.
    For eg if there are 1 or more than 1 item added to combo box it is triggerring action event twice(one just after when first item is added and one again when rest all items are added)
    and if there is no item then also it is triggering once.
    Can you please help me out.
    Thanks

    post the SSCCE code, then only it is easy to find the problem

  • Catching COMBO BOX item changed in VALIDATE event

    Hi expert,
    I need to catch the item changed event for a combo box.
    below the code:
    <B1Listener(BoEventTypes.et_VALIDATE, False)> _
    Public Overridable Sub OnAfterValidate(ByVal pVal As ItemEvent)
                Dim form As Form = B1Connections.theAppl.Forms().Item(pVal.FormUID)
                Dim mt As Matrix = Form.Items.Item("Matrix_0").Specific
    if (pVal.ColUID.Equals("TipoList") And pVal.ItemChanged) Then
    end if
    but pVal.ItemChanged is always equal to false even if I change the value selected in combo box.
    can anyone help me?
    Thanks in advance.
    Best regards
    Andrea

    Hi Andrea,
    you can also catch the Event through
    pVal.EventType =SAPbouiCOM.BoEventTypes.et_COMBO_SELECT
    through this event, you can perform you're reuqirement.
    regards
    shiva

  • Event problem in editable combo box

    I have three editable combo box in my JDialog. I can select the value from the combo or I can enter any value. I have to perform some operation when one button is pressed after I have given the values in the three combo boxes. Here, If I select any value from the combo box, there is no problem. But if I enter the value in the combo boxes, when I press the button, in the first click nothing is happening. The First click just selects the value that entered in the last combo box and in the second click it works properly. I am not facing this problem in JDK 1.2.2 or JDK1.3. This occurs only in JDK1.4. Please let me if anyone knows the reason for this.
    Thanks.

    in the fla that contains your loadMovie() statement:
    1. drag a combobox to the stage.
    2. remove it.
    3. the combobox component will now be in your library.
    re-publish your swf and retest.

  • Problem in refreshing the combo box on selection of an item in another comb

    I have a situation where values to be displayed in 2nd combo box depends on the selection of an item from the 1st combo box.
    Problem observed:
    The 2nd combo box is not getting refreshed if the selected item from the 1st combo box has mapping to more than 10 items.
    for ex:
    A - AA, AB, AC, AD, AE, AF
    B - BA, BB, BC, BD, BE, BF, BG, BH, BI, BJ, BK, BL, BM, BN, BO, BP
    C - CA, CB, CC
    D - DA, DB, DC, DD
    1st combo box list:
    A
    B
    C
    D
    2nd combo box list:
    If the value selected from the first combo box is A, C, or D then 2nd combo box refreshes with repective values. But when the value selected is B, then 2nd combo box is not getting refreshed with respective values.
    Combo Model for 1st combo box:
    public class proCLMLossTypeComboModel implements javax.swing.ComboBoxModel
    package nz.co.towerinsurance.quantum.claims.pro;
    import javax.swing.*;
    import java.util.*;
    import CoreProduct.mbsoPRDLossCauseTypeList;
    import javax.swing.event.*;
    public class proCLMLossTypeComboModel implements javax.swing.ComboBoxModel
    Vector vector = null;
    mbsoPRDLossCauseTypeList mbsoPRDLossCauseTypeListInst0 = null;
    public void setData(Vector vector)
    this.vector = vector;
    public int getSize()
    if(vector != null)
    return this.vector.size();     
    else
    return 0;
    public void addListDataListener(ListDataListener l)
    public void removeListDataListener(ListDataListener l)
    public Object getElementAt(int index)
    return this.vector.elementAt(index);     
    public Object getSelectedItem()
    return this.mbsoPRDLossCauseTypeListInst0;     
    public void setSelectedItem(Object anItem)
    mbsoPRDLossCauseTypeList mbsoPRDLossCauseTypeListInst1 = (mbsoPRDLossCauseTypeList)anItem;
    this.mbsoPRDLossCauseTypeListInst0 = mbsoPRDLossCauseTypeListInst1;
    public Vector getData()
    return this.vector;     
    Combo Model for 2nd combo box:
    package nz.co.towerinsurance.quantum.claims.pro;
    import javax.swing.*;
    import java.util.*;
    import CoreProduct.mbsoPRDCauseTypeList;
    import javax.swing.event.*;
    public class proCLMCauseTypeComboModel implements javax.swing.ComboBoxModel
    Vector vector = null;
    mbsoPRDCauseTypeList mbsoPRDCauseTypeListInst0 = null;
    public void setData(Vector vector)
    this.vector = vector;
    public int getSize()
    if(vector != null)
    return this.vector.size();     
    else
    return 0;
    public void addListDataListener(ListDataListener l)
    public void removeListDataListener(ListDataListener l)
    public Object getElementAt(int index)
    return this.vector.elementAt(index);     
    public Object getSelectedItem()
    return this.mbsoPRDCauseTypeListInst0;     
    public void setSelectedItem(Object anItem)
    mbsoPRDCauseTypeList mbsoPRDCauseTypeListInst1 = (mbsoPRDCauseTypeList)anItem;
    this.mbsoPRDCauseTypeListInst0 = mbsoPRDCauseTypeListInst1;
    public Vector getData()
    return this.vector;     
    The Panel inside which these combo boxes are used:
    package nz.co.towerinsurance.quantum.claims.pro;
    import nz.co.towerinsurance.quantum.logger.MessageLogger;
    import nz.co.towerinsurance.quantum.claims.vmo.*;
    import nz.co.towerinsurance.quantum.utility.uhoUTLDialogueContext;
    import nz.co.towerinsurance.quantum.utility.uhoUTLModelHolder;
    import nz.co.towerinsurance.quantum.utility.uhoUTLInteraction;
    import nz.co.towerinsurance.quantum.utility.uhoUTLNotesContext;
    import nz.co.towerinsurance.quantum.utility.uhoUTLPrivacyContext;
    import nz.co.towerinsurance.quantum.utility.uhoUTLProcessImpContext;
    import nz.co.towerinsurance.quantum.help.*;
    import nz.co.towerinsurance.quantum.document.*;
    import nz.co.towerinsurance.quantum.task.*;
    import nz.co.towerinsurance.quantum.qtm.*;
    import nz.co.towerinsurance.quantum.claims.uhoCLMClientModel;
    import nz.co.towerinsurance.quantum.claims.utility.*;
    import MCType.*;
    import Claim.*;
    import Client.*;
    import Policy.*;
    import CoreProduct.*;
    import Security.*;
    import MCUtil.*;
    import java.awt.*;
    import java.util.*;
    import javax.swing.*;
    import java.awt.event.*;
    import javax.swing.border.*;
    import javax.swing.ButtonGroup.*;
    import java.text.*;
    public class proSummaryPanel extends proCLMPanelBase implements proCLMRefreshInterface, proCLMDeclineReasonInterface
    private static final MessageLogger msgLogger=MessageLogger.getLogger("claims.pro.proSummaryPanel");
    uhoCLMClientModel uhoCLMClientModelInst0 = null;
    Vector VectorInst0 = new Vector();
    JRadioButton jRdBtnSummaryPM = new JRadioButton();
    JRadioButton jRdBtnSummaryAM = new JRadioButton();
    ButtonGroup ButtonGroupInst0 = new ButtonGroup();
    JButton jBtnSummarySearch = new JButton();
    JLabel jLblSummaryCompanyName = new JLabel();
    JLabel jLblSummaryCauseType = new JLabel();
    JTextField jTxtFldSummaryAmountSaved = new JTextField();
    JTextField jTxtFldSummaryDateNotified = new JTextField();
    JTextField jTxtFldSummary = new JTextField();
    JTextField jTxtFldSummarySuburb = new JTextField();
    JLabel jLblSummaryCatCode = new JLabel();
    JLabel jLblSummaryLossDesc = new JLabel();
    JLabel jLblSummaryDateNotified = new JLabel();
    JLabel jLblSummaryCity = new JLabel();
    JLabel jLblSummaryTime = new JLabel();
    JLabel jLblSummaryDeclineReason = new JLabel();
    JCheckBox jChkBxNcbLost = new JCheckBox();
    JCheckBox jChkBxLegal = new JCheckBox();
    JCheckBox jChkBxNoBlameBonus = new JCheckBox();
    JLabel jLblSummaryPostCode = new JLabel();
    JTextField jTxtFldSummaryStreetName = new JTextField();
    JTextField jTxtFldSummaryLossDate = new JTextField();
    JTextField jTxtFldSummaryCity = new JTextField();
    JTextField jTxtFldSummaryTime = new JTextField();
    JLabel jLblSummaryLossType = new JLabel();
    JTextField jTxtFldSummaryPhone = new JTextField();
    JTextField jTxtFldSummaryCompanyName = new JTextField();
    JLabel jLblSummarySuburb = new JLabel();
    JTextArea jTxtArLossDescription = new JTextArea();
    JScrollPane jScrPnSummaryLossDesc = new JScrollPane(jTxtArLossDescription);
    JTextField jTxtFldSummaryDeclineReason = new JTextField();
    JPanel jPanel2 = new JPanel();
    JPanel jPanel1 = this;
    JLabel jLblSummaryPhone = new JLabel();
    JTextField jTxtFldSummaryPostCode = new JTextField();
    JLabel jLblSummaryAmountSaved = new JLabel();
    JPanel jPnlSummaryCoy = new JPanel();
    JLabel jLblSummaryStreetName = new JLabel();
    Vector lossTypeVec = new Vector();
    JComboBox jCmbBxSummaryLossType = new JComboBox(lossTypeVec);
    proCLMLossTypeComboModel lossTypeComboModel = new proCLMLossTypeComboModel();
    Vector causeTypeVec = new Vector();
    JComboBox jCmbBxSummaryCauseType = new JComboBox();
    proCLMCauseTypeComboModel causeTypeComboModel = new proCLMCauseTypeComboModel();
    Vector CatCodeVec = new Vector();
    JComboBox jCmbBxSummaryCatCode = new JComboBox();
    proCLMCatCodeComboModel catCodeComboModel = new proCLMCatCodeComboModel();
    JLabel jLblSummaryLossDate = new JLabel();
    JButton jBtnSave = new JButton();
    JButton jBtnCancel = new JButton();
    Border border1;
    TitledBorder titledBorder1;
    Border border2;
    Border border3;
    TitledBorder titledBorder2;
    Border border4;
    TitledBorder titledBorder3;
    GridBagLayout gridBagLayout1 = new GridBagLayout();
    GridBagLayout gridBagLayout2 = new GridBagLayout();
    Border border5;
    TitledBorder titledBorder4;
    GridBagLayout gridBagLayout3 = new GridBagLayout();
    GridBagLayout gridBagLayout4 = new GridBagLayout();
    Component component1;
    Component component2;
    * @parameter uhoUTLInteraction ,mbsoSEMPrivilege
    * @return
    public proSummaryPanel(proQTMBase parent, uhoUTLInteraction inter,mbsoSEMPrivilege services)
    super(parent,inter,services);
    try {
    jbInit();
    catch(Exception e) {
    e.printStackTrace();
    * Component initialization
    * @parameter
    * @return void
    private void jbInit() throws Exception
    component1 = Box.createHorizontalStrut(8);
    component2 = Box.createHorizontalStrut(8);
    jCmbBxSummaryLossType.setMinimumSize(new Dimension(225, 25));
    // set the combo models
    jCmbBxSummaryLossType.setModel(lossTypeComboModel);
    jCmbBxSummaryCauseType.setModel(causeTypeComboModel);
    jCmbBxSummaryCatCode.setModel(catCodeComboModel);
    // renderer for the loss type combo
         jCmbBxSummaryLossType.setRenderer(new DefaultListCellRenderer()
         public Component getListCellRendererComponent(JList list, Object value,
         int index, boolean isSelected, boolean cellHasFocus)
         mbsoPRDLossCauseTypeList mbsoPRDLossTypeListObj = (mbsoPRDLossCauseTypeList) value;
         String v = (mbsoPRDLossTypeListObj == null) ? null:mbsoPRDLossTypeListObj.GetLossTypeName().toString();
         return super.getListCellRendererComponent(list,v,index,isSelected,cellHasFocus);
         // key selection manager for loss type combo
         jCmbBxSummaryLossType.setKeySelectionManager(new javax.swing.JComboBox.KeySelectionManager()
         public int selectionForKey(char aKey,ComboBoxModel aModel)
         try
         Vector vector = lossTypeComboModel.getData();
         // prepare a character array witht the first letter of loss types in lower case
         char[] characterArray = new char[vector.size()];
         for(int i=0;i<vector.size();i++)
         mbsoPRDLossCauseTypeList mbsoPRDLossCauseTypeListInst0 = (mbsoPRDLossCauseTypeList)vector.elementAt(i);
         char charac = mbsoPRDLossCauseTypeListInst0.GetLossTypeName().toString().toLowerCase().charAt(0);     
         characterArray[i] = charac;
         Character char1 = new Character(aKey);
         int index = 0;
         if(char1.isUpperCase(aKey))
         char char2 = char1.toLowerCase(aKey);
         index = java.util.Arrays.binarySearch(characterArray,char2);
         else
         index = java.util.Arrays.binarySearch(characterArray,aKey);
         if(index > 0)
         jCmbBxSummaryLossType.setSelectedIndex(index);
         else
         jCmbBxSummaryLossType.setSelectedIndex(0);
         jCmbBxSummaryLossType.repaint();
         if(index > 0)
         return index;
         else
         return 0;
         catch(Exception e1)
         msgLogger.fatal("Exception     : proSumamryPanel     : loss type combo key sel mgr : "+e1.getMessage());
         return 0;
         // renderer for cause type combo
         jCmbBxSummaryCauseType.setRenderer(new DefaultListCellRenderer() {
         public Component getListCellRendererComponent(JList list, Object value,
         int index, boolean isSelected, boolean cellHasFocus)
         mbsoPRDCauseTypeList mbsoPRDCauseTypeListObj = (mbsoPRDCauseTypeList) value;
         String v = (mbsoPRDCauseTypeListObj == null) ? null:mbsoPRDCauseTypeListObj.GetCauseTypeName().toString();
         return super.getListCellRendererComponent(list,v,index,isSelected,cellHasFocus);
         // key selection manager for loss type combo
         jCmbBxSummaryCauseType.setKeySelectionManager(new javax.swing.JComboBox.KeySelectionManager()
         public int selectionForKey(char aKey,ComboBoxModel aModel)
         try
         Vector vector = causeTypeComboModel.getData();
         // prepare a character array witht the first letter of loss types in lower case
         char[] characterArray = new char[vector.size()];
         for(int i=0;i<vector.size();i++)
         mbsoPRDCauseTypeList mbsoPRDCauseTypeListInst0 = (mbsoPRDCauseTypeList)vector.elementAt(i);
         char charac = mbsoPRDCauseTypeListInst0.GetCauseTypeName().toString().toLowerCase().charAt(0);     
         characterArray[i] = charac;
         Character char1 = new Character(aKey);
         int index = 0;
         if(char1.isUpperCase(aKey))
         char char2 = char1.toLowerCase(aKey);
         index = java.util.Arrays.binarySearch(characterArray,char2);
         else
         index = java.util.Arrays.binarySearch(characterArray,aKey);
         if(index > 0)
         jCmbBxSummaryCauseType.setSelectedIndex(index);
         else
         jCmbBxSummaryCauseType.setSelectedIndex(0);
         jCmbBxSummaryCauseType.repaint();
         if(index > 0)
         return index;
         else
         return 0;
         catch(Exception e1)
         msgLogger.fatal("Exception     : proSumamryPanel     : cause type combo key sel mgr : "+e1.getMessage());
         return 0;
    jBtnSummarySearch.setBorder(BorderFactory.createRaisedBevelBorder());
    jBtnSummarySearch.setMaximumSize(new Dimension(119, 23));
    jBtnSummarySearch.setPreferredSize(new Dimension(65, 23));
    jBtnSummarySearch.setMnemonic(KeyEvent.VK_E); // 20/12
    jBtnSummarySearch.setText("Search");
    this.setLayout(gridBagLayout4);
    ButtonGroupInst0.add(jRdBtnSummaryPM);
    ButtonGroupInst0.add(jRdBtnSummaryAM);
    border1 = BorderFactory.createEtchedBorder(Color.white,new Color(142, 142, 142));
    titledBorder1 = new TitledBorder(border1,"Where Is It Now?");
    border2 = BorderFactory.createEtchedBorder(Color.white,new Color(142, 142, 142));
    border3 = BorderFactory.createEtchedBorder(Color.white,new Color(142, 142, 142));
    titledBorder2 = new TitledBorder(border3,"Where Is It Now?");
    border4 = BorderFactory.createEtchedBorder(Color.white,new Color(142, 142, 142));
    titledBorder3 = new TitledBorder(border4,"Summary");
    border5 = BorderFactory.createEtchedBorder(Color.white,new Color(142, 142, 142));
    titledBorder4 = new TitledBorder(border5,"Location of Vehicle/Boat");
    jScrPnSummaryLossDesc.setToolTipText("");
    jScrPnSummaryLossDesc.setFont(new java.awt.Font("SansSerif", 0, 12));
    jScrPnSummaryLossDesc.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
    jLblSummarySuburb.setText("Suburb");
    jLblSummarySuburb.setForeground(Color.black);
    jLblSummarySuburb.setPreferredSize(new Dimension(100, 17));
    jLblSummarySuburb.setFont(new java.awt.Font("SansSerif", 1, 12));
    jTxtFldSummaryCompanyName.setFont(new java.awt.Font("SansSerif", 0, 12));
    jTxtFldSummaryCompanyName.setBorder(BorderFactory.createLoweredBevelBorder());
    jTxtFldSummaryCompanyName.setMinimumSize(new Dimension(100, 20));
    jTxtFldSummaryCompanyName.setPreferredSize(new Dimension(100, 20));
    jTxtFldSummaryPhone.setToolTipText("");
    jTxtFldSummaryPhone.setBorder(BorderFactory.createLoweredBevelBorder());
    jTxtFldSummaryPhone.setMinimumSize(new Dimension(100, 20));
    jTxtFldSummaryPhone.setPreferredSize(new Dimension(100, 20));
    jTxtFldSummaryPhone.setFont(new java.awt.Font("SansSerif", 0, 12));
    jLblSummaryLossType.setText("Loss Type");
    jLblSummaryLossType.setForeground(Color.black);
    jLblSummaryLossType.setPreferredSize(new Dimension(102, 17));
    jLblSummaryLossType.setFont(new java.awt.Font("SansSerif", 1, 12));
    jTxtFldSummaryTime.setBorder(BorderFactory.createLoweredBevelBorder());
    jTxtFldSummaryTime.setMinimumSize(new Dimension(100, 20));
    jTxtFldSummaryTime.setPreferredSize(new Dimension(100, 20));
    jTxtFldSummaryTime.setFont(new java.awt.Font("SansSerif", 0, 12));
    jTxtFldSummaryCity.setFont(new java.awt.Font("SansSerif", 0, 12));
    jTxtFldSummaryCity.setBorder(BorderFactory.createLoweredBevelBorder());
    jTxtFldSummaryCity.setMinimumSize(new Dimension(100, 20));
    jTxtFldSummaryCity.setPreferredSize(new Dimension(100, 20));
    jTxtFldSummaryLossDate.setBackground(Color.cyan);
    jTxtFldSummaryLossDate.setBorder(BorderFactory.createLoweredBevelBorder());
    jTxtFldSummaryLossDate.setMinimumSize(new Dimension(100, 20));
    jTxtFldSummaryLossDate.setPreferredSize(new Dimension(100, 20));
    jTxtFldSummaryLossDate.setFont(new java.awt.Font("SansSerif", 0, 12));
    jBtnSave.setToolTipText("");
    jBtnSave.setBorder(BorderFactory.createRaisedBevelBorder());
    jBtnSave.setMnemonic('S');
    jBtnSave.setText("Save");
    jBtnSave.setPreferredSize(new Dimension(100,23)); // 30/07
    jBtnSummarySearch.addActionListener(new java.awt.event.ActionListener(){
    public void actionPerformed(ActionEvent e) {
    jBtnSummarySearch_actionPerformed(e);
    //the listener for losstype combobox
    jCmbBxSummaryLossType.addItemListener(new java.awt.event.ItemListener() {
    public void itemStateChanged(ItemEvent e) {
    jCmbBxSummaryLossType_itemStateChanged(e);
    //Actioin listener for Save button
    jBtnSave.addActionListener(new java.awt.event.ActionListener()
    public void actionPerformed(ActionEvent e)
    jBtnSave_actionPerformed(e);
    //Actioin listener for Cancel button
    jTxtFldSummaryStreetName.setFont(new java.awt.Font("SansSerif", 0, 12));
    jTxtFldSummaryStreetName.setBorder(BorderFactory.createLoweredBevelBorder());
    jTxtFldSummaryStreetName.setMinimumSize(new Dimension(100, 20));
    jTxtFldSummaryStreetName.setPreferredSize(new Dimension(100, 20));
    jLblSummaryPostCode.setText("Post Code");
    jLblSummaryPostCode.setForeground(Color.black);
    jLblSummaryPostCode.setPreferredSize(new Dimension(100, 17));
    jLblSummaryPostCode.setFont(new java.awt.Font("SansSerif", 1, 12));
    jChkBxNcbLost.setFont(new java.awt.Font("SansSerif", 1, 12));
    jChkBxNcbLost.setPreferredSize(new Dimension(130, 17));
    jChkBxNcbLost.setText("NCB Lost");
    jLblSummaryDeclineReason.setText("Decline Reason");
    jLblSummaryDeclineReason.setForeground(Color.black);
    jLblSummaryDeclineReason.setPreferredSize(new Dimension(102, 17));
    jLblSummaryDeclineReason.setFont(new java.awt.Font("SansSerif", 1, 12));
    jLblSummaryTime.setText("Time");
    jLblSummaryTime.setForeground(Color.black);
    jLblSummaryTime.setPreferredSize(new Dimension(35, 17));
    jLblSummaryTime.setFont(new java.awt.Font("SansSerif", 1, 12));
    jLblSummaryCity.setText("Town/City");
    jLblSummaryCity.setForeground(Color.black);
    jLblSummaryCity.setPreferredSize(new Dimension(100, 17));
    jLblSummaryCity.setFont(new java.awt.Font("SansSerif", 1, 12));
    jLblSummaryDateNotified.setText("Date Notified");
    jLblSummaryDateNotified.setForeground(Color.black);
    jLblSummaryDateNotified.setPreferredSize(new Dimension(102, 17));
    jLblSummaryDateNotified.setFont(new java.awt.Font("SansSerif", 1, 12));
    jLblSummaryLossDesc.setText("Loss Description");
    jLblSummaryLossDesc.setForeground(Color.black);
    jLblSummaryLossDesc.setPreferredSize(new Dimension(102, 17));
    jLblSummaryLossDesc.setFont(new java.awt.Font("SansSerif", 1, 12));
    jLblSummaryCatCode.setText("Catastrophe Code");
    jLblSummaryCatCode.setForeground(Color.black);
    jLblSummaryCatCode.setFont(new java.awt.Font("SansSerif", 1, 12));
    jTxtFldSummarySuburb.setFont(new java.awt.Font("SansSerif", 0, 12));
    jTxtFldSummarySuburb.setBorder(BorderFactory.createLoweredBevelBorder());
    jTxtFldSummarySuburb.setMinimumSize(new Dimension(100, 20));
    jTxtFldSummarySuburb.setPreferredSize(new Dimension(100, 20));
    jTxtFldSummaryAmountSaved.setFont(new java.awt.Font("SansSerif", 0, 12));
    jTxtFldSummaryAmountSaved.setBorder(BorderFactory.createLoweredBevelBorder());
    jTxtFldSummaryAmountSaved.setMinimumSize(new Dimension(100, 20));
    jTxtFldSummaryAmountSaved.setPreferredSize(new Dimension(100, 20));
    jTxtFldSummaryDateNotified.setFont(new java.awt.Font("SansSerif", 0, 12));
    jTxtFldSummaryDateNotified.setBorder(BorderFactory.createLoweredBevelBorder());
    jTxtFldSummaryDateNotified.setMinimumSize(new Dimension(100, 20));
    jTxtFldSummaryDateNotified.setPreferredSize(new Dimension(100, 20));
    jLblSummaryCauseType.setText("Cause Type");
    jLblSummaryCauseType.setForeground(Color.black);
    jLblSummaryCauseType.setPreferredSize(new Dimension(102, 17));
    jLblSummaryCauseType.setFont(new java.awt.Font("SansSerif", 1, 12));
    jLblSummaryCompanyName.setText("Company Name");
    jLblSummaryCompanyName.setForeground(Color.black);
    jLblSummaryCompanyName.setPreferredSize(new Dimension(100, 17));
    jLblSummaryCompanyName.setFont(new java.awt.Font("SansSerif", 1, 12));
    jCmbBxSummaryCatCode.setFont(new java.awt.Font("SansSerif", 0, 12));
    jCmbBxSummaryCatCode.setMinimumSize(new Dimension(225, 25));  // on 21/11
    jCmbBxSummaryCatCode.setPreferredSize(new Dimension(126, 25));
    jRdBtnSummaryPM.setFont(new java.awt.Font("SansSerif", 1, 12));
    jRdBtnSummaryPM.setPreferredSize(new Dimension(40, 17));
    jRdBtnSummaryPM.setText("pm");
    jTxtFldSummaryDeclineReason.setFont(new java.awt.Font("SansSerif", 0, 12));
    jTxtFldSummaryDeclineReason.setBorder(BorderFactory.createLoweredBevelBorder());
    jTxtFldSummaryDeclineReason.setMinimumSize(new Dimension(225, 20));
    jTxtFldSummaryDeclineReason.setPreferredSize(new Dimension(225, 20));
    jChkBxLegal.setPreferredSize(new Dimension(130, 17));
    jChkBxLegal.setText("Legal");
    jChkBxLegal.setActionCommand("jChkBxLegal");
    jChkBxLegal.setFont(new java.awt.Font("SansSerif", 1, 12));
    jPanel2.setBorder(BorderFactory.createEtchedBorder());
    jPanel2.setLayout(gridBagLayout1);
    jPanel1.setLayout(gridBagLayout3);
    jLblSummaryPhone.setFont(new java.awt.Font("SansSerif", 1, 12));
    jLblSummaryPhone.setForeground(Color.black);
    jLblSummaryPhone.setPreferredSize(new Dimension(100, 17));
    jLblSummaryPhone.setText("Phone");
    jRdBtnSummaryAM.setPreferredSize(new Dimension(40, 17));
    jRdBtnSummaryAM.setText("am");
    jRdBtnSummaryAM.setFont(new java.awt.Font("SansSerif", 1, 12));
    jRdBtnSummaryAM.setSelected(true); // 20/12
    jTxtFldSummaryPostCode.setBorder(BorderFactory.createLoweredBevelBorder());
    jTxtFldSummaryPostCode.setMinimumSize(new Dimension(100, 20));
    jTxtFldSummaryPostCode.setPreferredSize(new Dimension(100, 20));
    jTxtFldSummaryPostCode.setFont(new java.awt.Font("SansSerif", 0, 12));
    jLblSummaryAmountSaved.setText("Amount Saved");
    jLblSummaryAmountSaved.setForeground(Color.black);
    jLblSummaryAmountSaved.setPreferredSize(new Dimension(102, 17));
    jLblSummaryAmountSaved.setFont(new java.awt.Font("SansSerif", 1, 12));
    jPnlSummaryCoy.setFont(new java.awt.Font("SansSerif", 1, 12));
    jPnlSummaryCoy.setBorder(titledBorder4);
    jPnlSummaryCoy.setLayout(gridBagLayout2);
    jLblSummaryStreetName.setFont(new java.awt.Font("SansSerif", 1, 12));
    jLblSummaryStreetName.setForeground(Color.black);
    jLblSummaryStreetName.setPreferredSize(new Dimension(100, 17));
    jLblSummaryStreetName.setText("Street Name");
    jCmbBxSummaryLossType.setBackground(Color.cyan);
    jCmbBxSummaryLossType.setFont(new java.awt.Font("SansSerif", 0, 12));
    jCmbBxSummaryLossType.setPreferredSize(new Dimension(225, 26));
    jCmbBxSummaryCauseType.setBackground(Color.cyan);
    jCmbBxSummaryCauseType.setFont(new java.awt.Font("SansSerif", 0, 12));
    jCmbBxSummaryCauseType.setPreferredSize(new Dimension(225, 26));
    jLblSummaryLossDate.setText("Loss Date");
    jLblSummaryLossDate.setForeground(Color.black);
    jLblSummaryLossDate.setPreferredSize(new Dimension(102, 17));
    jLblSummaryLossDate.setFont(new java.awt.Font("SansSerif", 1, 12));
    jTxtArLossDescription.setLineWrap(true);
    jTxtArLossDescription.setWrapStyleWord(true);
    jTxtArLossDescription.setBackground(Color.cyan);
    jTxtArLossDescription.setFont(new java.awt.Font("SansSerif", 0, 12));
    jTxtArLossDescription.setBounds(new Rectangle(124, 39, 394, 46));
    jChkBxNoBlameBonus.setPreferredSize(new Dimension(130, 17));
    jChkBxNoBlameBonus.setText("No Blame Bonus ");
    jChkBxNoBlameBonus.setFont(new java.awt.Font("SansSerif", 1, 12));
    jPanel1.setBorder(titledBorder3);
    jPanel1.setBounds(new Rectangle(23, 11, 810, 436));
    jPanel1.add(jLblSummaryCatCode, new GridBagConstraints(0, 6, 1, 1, 0.1, 0.05
    ,GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
    jPanel1.add(jScrPnSummaryLossDesc, new GridBagConstraints(1, 1, 6, 1, 0.9, 0.15
    ,GridBagConstraints.SOUTHWEST, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
    jScrPnSummaryLossDesc.getViewport().add(jTxtArLossDescription, null);
    jPanel1.add(jRdBtnSummaryPM, new GridBagConstraints(5, 0, 1, 1, 0.1, 0.05
    ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
    jPanel1.add(jTxtFldSummaryDeclineReason, new GridBagConstraints(1, 8, 2, 1, 0.1, 0.1
    ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
    jPanel1.add(jLblSummaryLossDesc, new GridBagConstraints(0, 1, 1, 1, 0.1, 0.5
    ,GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
    jPanel1.add(jLblSummaryLossType, new GridBagConstraints(0, 3, 1, 1, 0.1, 0.05
    ,GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
    jPanel1.add(jLblSummaryCauseType, new GridBagConstraints(0, 4, 1, 1, 0.1, 0.05
    ,GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
    jPanel1.add(jLblSummaryDeclineReason, new GridBagConstraints(0, 8, 1, 1, 0.1, 0.05
    ,GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
    jPanel1.add(jLblSummaryLossDate, new GridBagConstraints(0, 0, 1, 1, 0.1, 0.05
    ,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
    jPanel1.add(jTxtFldSummaryTime, new GridBagConstraints(3, 0, 1, 1, 0.1, 0.05
    ,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
    jPanel1.add(jLblSummaryTime, new GridBagConstraints(3, 0, 1, 1, 0.1, 0.05
    ,GridBagConstraints.NORTH, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 107, 7));
    jPanel1.add(jRdBtnSummaryAM, new GridBagConstraints(4, 0, 1, 1, 0.1, 0.05
    ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
    jPanel1.add(jCmbBxSummaryCauseType, new GridBagConstraints(1, 4, 2, 1, 0.1, 0.05
    ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
    jPanel1.add(jTxtFldSummaryLossDate, new GridBagConstraints(1, 0, 1, 1, 1.0, 0.05
    ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
    jPanel1.add(jTxtFldSummaryDateNotified, new GridBagConstraints(1, 7, 1, 1, 0.1, 0.05
    ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
    jPanel1.add(jPanel2, new GridBagConstraints(0, 9, 6, 1, 1.0, 0.1
    ,GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
    jPanel2.add(jChkBxNoBlameBonus, new GridBagConstraints(3, 0, 1, 1, 0.1, 0.0
    ,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
    jPanel2.add(jChkBxLegal, new GridBagConstraints(4, 0, 1, 1, 0.1, 0.0
    ,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
    jPanel2.add(jBtnSave, new GridBagConstraints(5, 0, 1, 1, 0.1, 0.0
    ,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
    jPanel2.add(jChkBxNcbLost, new GridBagConstraints(2, 0, 1, 1, 0.1, 0.0
    ,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
    jPanel2.add(component1, new GridBagConstraints(1, 0, 1, 1, 0.35, 0.0
    ,GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
    jPanel2.add(component2, new GridBagConstraints(5, 0, 1, 1, 0.35, 0.0
    ,GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
    jPanel1.add(jCmbBxSummaryLossType, new GridBagConstraints(1, 3, 2, 1, 0.1, 0.05
    ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
    jPanel1.add(jCmbBxSummaryCatCode, new GridBagConstraints(1, 6, 2, 1, 0.1, 0.05
    ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
    jPanel1.add(jPnlSummaryCoy, new GridBagConstraints(2, 3, 4, 6, 1.0, 0.0
    ,GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
    jPnlSummaryCoy.add(jLblSummaryPhone, new GridBagConstraints(0, 6, 1, 1, 0.5, 0.16
    ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
    jPnlSummaryCoy.add(jLblSummarySuburb, new GridBagConstraints(0, 3, 1, 1, 0.5, 0.16
    ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
    jPnlSummaryCoy.add(jTxtFldSummaryStreetName, new GridBagConstraints(1, 2, 1, 1, 0.5, 0.16
    ,GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
    jPnlSummaryCoy.add(jTxtFldSummaryCity, new GridBagConstraints(1, 4, 1, 1, 0.5, 0.16
    ,GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
    jPnlSummaryCoy.add(jTxtFldSummaryPostCode, new GridBagConstraints(1, 5, 1, 1, 0.5, 0.16
    ,GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
    jPnlSummaryCoy.add(jTxtFldSummarySuburb, new GridBagConstraints(1, 3, 1, 1, 0.5, 0.16
    ,GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
    jPnlSummaryCoy.add(jLblSummaryPostCode, new GridBagConstraints(0, 5, 1, 1, 0.5, 0.16
    ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
    jPnlSummaryCoy.add(jTxtFldSummaryPhone, new GridBagConstraints(1, 6, 1, 1, 0.5, 0.16
    ,GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
    jPnlSummaryCoy.add(jTxtFldSummaryCompanyName, new GridBagConstraints(1, 0, 1, 1, 0.5, 0.16
    ,GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
    jPnlSummaryCoy.add(jLblSummaryCompanyName, new GridBagConstraints(0, 0, 1, 1, 0.5, 0.16
    ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
    jPnlSummaryCoy.add(jLblSummaryStreetName, new GridBagConstraints(0, 2, 1, 1, 0.5, 0.16
    ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
    jPnlSummaryCoy.add(jLblSummaryCity, new GridBagConstraints(0, 4, 1, 1, 0.5, 0.16
    ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
    jPanel1.add(jLblSummaryDateNotified, new GridBagConstraints(0, 7, 1, 1, 0.1, 0.05
    ,GridBagConstraints.EAST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
    jPanel1.add(jBtnSummarySearch, new GridBagConstraints(1, 5, 1, 1, 0.0, 0.0
    ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
    jTxtFldSummaryLossDate.grabFocus();
    jTxtFldSummaryLossDate.setNextFocusableComponent(jTxtFldSummaryTime);
    jTxtFldSummaryTime.setNextFocusableComponent(jRdBtnSummaryAM);
    jRdBtnSummaryAM.setNextFocusableComponent(jRdBtnSummaryPM);
    jRdBtnSummaryPM.setNextFocusableComponent(jTxtArLossDescription);
    jTxtArLossDescription.setNextFocusableComponent(jCmbBxSummaryLossType);
    jCmbBxSummaryLossType.setNextFocusableComponent(jCmbBxSummaryCauseType);
    jCmbBxSummaryCauseType.setNextFocusableComponent(jBtnSummarySearch);
    jBtnSummarySearch.setNextFocusableComponent(jCmbBxSummaryCatCode);
    jCmbBxSummaryCatCode.setNextFocusableComponent(jTxtFldSummaryDateNotified);
    jTxtFldSummaryDateNotified.setNextFocusableComponent(jTxtFldSummaryDeclineReason);
    jTxtFldSummaryDeclineReason.setNextFocusableComponent(jTxtFldSummaryCompanyName);
    jTxtFldSummaryCompanyName.setNextFocusableComponent(jTxtFldSummaryStreetName);
    jTxtFldSummaryStreetName.setNextFocusableComponent(jTxtFldSummarySuburb);
    jTxtFldSummarySuburb.setNextFocusableComponent(jTxtFldSummaryCity);
    jTxtFldSummaryCity.setNextFocusableComponent(jTxtFldSummaryPostCode);
    jTxtFldSummaryPostCode.setNextFocusableComponent(jTxtFldSummaryPhone);
    jTxtFldSummaryPhone.setNextFocusableComponent(jChkBxNcbLost);
    jChkBxNcbLost.setNextFocusableComponent(jChkBxNoBlameBonus);
    jChkBxNoBlameBonus.setNextFocusableComponent(jChkBxLegal);
    jChkBxLegal.setNextFocusableComponent(jBtnSave);
    jBtnSave.setNextFocusabl                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     &nbs

    the very simple strategy to do is to call removeAllItems() method for the 2nd combox box and then insert the contents. this is because the validate() method is not repeatedly called and so the contents are not updated immediately.

  • How to retrieve data in Combo box?

    :mad; I need to do a form for delivery order. Just fill some
    personal data and order of product. Inside I have some combo box of
    product, but I need save the record into txt file (just once time)
    then need to retrieve the data from txt file onto combo box. I have
    attached the code, I don't know which part got wrong, anybody who
    get help me?

    "roy16" <[email protected]> wrote in message
    news:[email protected]...
    >
    I need to do a form for delivery order. Just fill
    some personal data
    > and
    > order of product. Inside I have some combo box of
    product, but I need
    > save the
    > record into txt file (just once time) then need to
    retrieve the data from
    > txt
    > file onto combo box. I have attached the code, I don't
    know which part got
    > wrong, anybody who get help me?
    >
    > Combo box code :
    > controls := wcGetControlList()
    > listing := "Choose an Item"^Return^"Hot
    > Chocholate"^Return^"Tea"^Return^"Coffee"^Return^"Low fat
    > Milk"^Return^"Full
    > Cream Milk"^Return^"Orange Juice"^Return^"Purified
    Water"
    > id_list := wcDisplayControl(350, 350, 150, 21,
    "ComboBox", "wcS")
    > propList := wcGetPropertyList(id_list)
    >
    >
    > Save the data from Combo box list :
    > data := wcGetPropertyValue(id_list, "value")^Return
    data at this point will be some number between 0 and 7 and
    your appended
    return.
    > WriteExtFile("list2.txt", data)
    >
    > Read the data from txt :
    > data := ReadExtFile("list2.txt")
    This will again be a string that contains a number and a
    return.
    > Convert string to list :
    > id_list := [:]
    Before, you are populating id_list with a single number that
    is the _ID_ of
    the winCtrl . Now, you are changing it to an empty property
    list. Why?
    > AddProperty(data^id_list,controls ,GetLine(data,1))
    The first parameter of AddProperty is supposed to be the name
    of a variable
    which is a property list. As such, you couldn't use a
    concatenated
    expression there. Even if you could, an Authorware variable
    cannot begin
    with a number, which data always will in this instance. It
    also cannot
    contain a return. _And_ the characters "[:]" are not valid
    parts of a
    variable name either. Next, you're trying to add a property
    that looks
    something like:
    "Button\rCheckBox\rCheckListBox\rColorCombo\rComboBox\rDriveCombo\rEdit..."
    While a property list _can_ have strings instead of symbols
    as the keys to
    the values, this is not documented or officially supported.
    Even if it
    were, you _cannot_ have a key with returns in it, and I have
    no idea why
    you'd want to!
    Here are the steps you should be using:
    1) Create your WinCtrl and store its ID in a regular numeric
    value (I'll
    call it wcID for convenience)
    2) Set its Items property to listing.
    3) Check for the existence (FileType) of your file with the
    value of the
    winCtrl in it. If it exists, set the value property of wcID
    to the contents
    of the file.
    4) You're using wcS as your change event, so set up a
    conditional on false
    to true with wcS as the condition.
    5) Inside that response, write the "value" property (without
    the return) of
    the wcID control to file.
    HTH;
    Amy

Maybe you are looking for

  • Error in loading data from PSA to masterdataTables by using ProcessManually

    Hello, While loading Attribute master data to Masterdata tables, the data is loaded successfully to PSA but when I clicked process manually tab in the monitor screen to load the Attribute master data to Masterdata tables it is showing error. Can anyo

  • Why can't I see my address book contents in Icloud?

    I was under the impression that the contents of my address book would migrate across to iCloud!  I have the iCloud account selected under 'Preferences' in my Address Book and I have deleted and added my iCloud account to also try and activate the mig

  • Can i know what type of object is stored in Vector?

    i have written a program for vector where i am adding elements like sunday, monday , 3.14, 9,5.56 and i want to sum all elements of type double only double data type numbers. it should not add int number or string ? import java.util.*; class VectorBa

  • T-code for reports

    Hello, We have OARP - AA reports KSBB- CCA reports What are the other t-codes for AR,AP,GL, etc reports

  • Best program to use in FCS 2 to do this?

    i am looking to match audio from a song to audio from a music video....i just can't get them to match up exactly with final cut because it goes by frames so they sometimes snap jussssst off target...any help??