Combo Box Component

Hi all,
I am trying to figure out how to put a comboBox in my Flash
form and normally I just use something like:
countryList.dataProvider = ["Country1", "Country2",
"Country3", "Country4"];
var listenerObject:Object = new Object();
listenerObject.change = function(evtObj:Object) {
// code placed here executes
// when the event is triggered
trace("Selected Item: "+countryList.selectedItem);
countryList.addEventListener("change",listenerObject);
This will give me the selected item's value which I can chuck
in a variable and send off to my form...
Well that is usually good enough but now I want to have a
Label AND a Value so that when the user does the drop down they see
the Label but I am actually sending the Value. I am messing around
with the Flash Help code and I kind of see how this is working yet
I can not get at the data I need which is the Value not the Label.
my_cb.dataProvider = [{name:"Gary", gender:"male"},
{name:"Susan", gender:"female"}];
my_cb.labelField = "name";
var listenerObject:Object = new Object();
listenerObject.change = function(evtObj:Object) {
// code placed here executes
// when the event is triggered
trace("Selected Item: "+my_cb.selectedItem);
my_cb.addEventListener("change",listenerObject);
Any help on this would be greatly appreciated.

> You would think there was something easy to allow for a
label being
> different
> from the variable I'm sending. All I want to do is make
the drop down menu
> say
> "Afghanistan" while I am sending the form data "AF" to
the .php script
> that
> will save the data to a mySQl database. I can easily
send the name of the
> country (Afghanistan) as thats the name of
my_cb.selectedItem. I'm just
> not
> sure why it is so difficult to send the value (AF)
instead. I'm just not
> getting it.
Did you put the code I supplied in the event handler?
var listenerObject:Object = new Object();
listenerObject.change = function(evtObj:Object) {
// code placed here executes
// when the event is triggered
trace("Selected Item Data: "+my_cb.selectedItem.data); //Put
code here
Dan Smith > adobe community expert
http://www.dsmith.tv

Similar Messages

  • Bugging Array by using COMBO BOX component !!!

    Hi,
    Today, I create a flash with Array. I did use prototype
    method to add one more fantastic function to sort the array
    randomly. But when I include one combo box component with static
    value in to the parent file, I have a big trouble. The flash file
    stop running & give the alert of endless looping. Ah ha, what a
    funny thing is happened out there?
    If you want to produce this bug, please follow me.
    Step1: Create 1 flash movie & name it "test.fla". Copy
    the code below into the first frame.
    Array.prototype.randomSort = function():Array {
    var arr1:Array = this;
    var arr2:Array = new Array();
    var rand:Number;
    while (arr1.length>0) {
    trace(arr1.length);
    rand = Math.floor(Math.random()*arr1.length);
    if (rand == 1 && arr1.length == 1) {
    rand = 0;
    arr2.push(arr1[rand]);
    arr1.splice(rand, 1);
    return arr2;
    Step2: Export the movie by Ctrl+Enter -> we will have
    test.swf huh?
    Step3: Create another flash & name it "main.fla".
    Step4: In main.fla, create an empty movieclip symbol &
    name it loader_mc. Drag it to the stage & five the instance
    name "XXXloader_mc" for example.
    Step5: In main.fla, Drag one combo box component to the stage
    & add some data to the combo
    Step6: In the first frame of main.fla, load the test movie
    into XXXloader_mc. Try this
    XXXloader_mc.loadMovie("test.swf");
    Step7: Export main.fla. Ctrl+Enter again.
    Congratulation, you are in the problem.

    both together caused the problem and i don't see a problem
    with your randomSort() method although destroying the original
    array seems like a bad idea and is one of the 2 reasons for your
    problem:
    one, the combobox is executing your method (and every other
    array prototype method that exists) every time it's clicked. that
    looks like a bug in the combobox component.
    and two, your prototype is causing a problem because it
    destroys the arrays that call your method.

  • Flash combo box component

    I have created an application that requires the flash combo
    box component but i dont know how to code it. Any help?
    I want each label to goto a certain frame when clicked.
    Jak.
    Cheers if you can help

    Drag a combo box onto the stage.
    Give it an instance name (myCombo)
    Click properties and add the labels
    Add the frame numbers you want to jump to as data
    Add to frame actions

  • To filter data in two dates using combo box component

    Hi,
    I have a requirement like, i need to filter data in chart between two dates from two combo box.. From combo_box and To combo_box.
    I am using one QaaWS to populate LOV's into Combo box's and another QaaWS for chart data. Universe is the same one on SAP  BI query.
    LOV's are populating into both combo's and chart as well, i used a query refresh button after choosing two dates and press button.
    Data is not reflecting as per the choice of dates.
    If any one have such scenario, request you to share the same....
    Thanks in advance...
    Raj..

    Problem is with ranges, not with dates, my data is working fine with CALDAY (in BI Query)....
    My query variable is on FiscalPeriod month, like "FEB 2011"  to "OCT 2011" and is optional, but it is fails in QaaWS to execute when i try to input any months.
    If we give default values in BI query format is like K4/010.2011 for october month. QaaWS doesnt fail and executes, but if i change any value in QaaWS it is taking as "OCT 2011"
    And in Xcelsius it is not recognizing eaither of the formats like, K4/010.2011 or "OCT 2011"
    the format is not matching with xcelsius.

  • Help with Combo Box Component

    I am creating an application with comboboxes and using action
    script to load them. I can figure out how to change text color of
    the choices in the combo box, but can anyone tell if it is possible
    to make the text choices appear as different colors. For instance
    if I wanted all of the choices to be black text, but for the third
    choice down to appear red.
    Thanks for the help.

    You can set the backgroubd color if that helps.
    To set the second item to have a red background, attach this
    to the combobox:
    on(open){
    dropdown.setPropertiesAt(1,{backgroundColor:0xFF0000})
    }

  • Combo box component reset

    once an item is selected. the component is still set on that
    option so if I choose that option again it doesn't do anything.
    How do I reset it?

    > You would think there was something easy to allow for a
    label being
    > different
    > from the variable I'm sending. All I want to do is make
    the drop down menu
    > say
    > "Afghanistan" while I am sending the form data "AF" to
    the .php script
    > that
    > will save the data to a mySQl database. I can easily
    send the name of the
    > country (Afghanistan) as thats the name of
    my_cb.selectedItem. I'm just
    > not
    > sure why it is so difficult to send the value (AF)
    instead. I'm just not
    > getting it.
    Did you put the code I supplied in the event handler?
    var listenerObject:Object = new Object();
    listenerObject.change = function(evtObj:Object) {
    // code placed here executes
    // when the event is triggered
    trace("Selected Item Data: "+my_cb.selectedItem.data); //Put
    code here
    Dan Smith > adobe community expert
    http://www.dsmith.tv

  • Increasing row capacity of any excelcius component (Filter ,Combo Box)

    Hi
    Even though I have increased the capacity of Dashboard rows capacity from 512 to 2000.
    But my filter component or combo box component source data is mapped to more than 512 rows in the spreadsheet,while previewing it still shows data of 512 rows.
    Is there any way to increase component capability?
    I know the performance will be bad but still atleast it should capture the whole source data records and

    It could be two reasons
      First Reason: it could be due to the limit of no of rows in excel .Please check the preferences option in Xcelsius . By default it will be set as 512 rows of data increase that to required rows.
       Second Reason: if you are using live office in Xcelsius.By default it will fetch 512 rows of data.To increase limit we have to do some server side settings.Please refer to the following SAP Note which gives the solution to this problem.
      SAP Note:1307538
      or go through the following steps:
    These changes have to be made on the server side
    1.     Create a backup of dsws-liveoffice-provider.jar from serveru2019s InstallDrive:\program files\business objects\Tomcat\webapps\dswsbobje\WEB-INF\lib for future reference.
    2.     Copy dsws-liveoffice-provider.jar from serveru2019s InstallDrive:\program files\business objects\Tomcat\webapps\dswsbobje\WEB-INF\lib to your computer.
    3.     Rename the file just copied to dsws-liveoffice-provider.jar.zip (add.zip to end of filename)
    4.     Create folder in root of InstallDrive: named META-INF (case sensitive), in InstallDrive:\META-INF named BusinessObjects (case sensitive) and in InstallDrive:\META-INF\BusinessObjects named DSWS (case sensitive)
    5.     Using WinZip or WinRAR, unzip the file named liveoffice_config.properties from the dsws-liveoffice-ws.jar.zip file copied from the server. Place this file in InstallDrive:\META-INF\BusinessObjects\DSWS.
    6.     Edit the liveoffice_config.properties file and find the following section:
    #max number of range rows and range columns to return
    maxRowCount=512
    maxColumnCount=512
    7.     Edit the maxRowCount entry to the value youu2019d like to use
    8.     Save the file as liveoffice_config.properties (same filename)
    9.     Using winRAR or WinZip add the new liveoffice_config.properties file back to dsws-liveoffice-ws.jar.zip, making sure to use the "use absolute path" option.
    10.     Stop Apache Tomcat service on BO server
    11.     Copy dsws-liveoffice-ws.jar.zip to serveru2019s InstallDrive:\program files\business objects\Tomcat\webapps\dswsbobje\WEB-INF\lib.
    12.     Rename dsws-liveoffice-provider.jar in serveru2019s InstallDrive:\program files\business objects\Tomcat\webapps\dswsbobje\WEB-INF\lib directory to dsws-liveoffice-provider.jar.old.
    13.     Rename dsws-liveoffice-provider.jar.zip in serveru2019s c:\program files\business objects\Tomcat\webapps\dswsbobje\WEB-INF\lib directory to dsws-liveoffice-provider.jar
    14.      Empty the Tomcat cache by deleting the content of the folder <<C:\Program Files\Business Objects\Tomcat55\work>>
    15.     Restart Apache Tomcat on server
    This should increase the number of rows fetched by LiveOffice, however it may happen that changing the number of rows in the liveoffice_config.properties many times may result in liveoffice picking the data from the cache. Hence deleting the cache (C:\Program Files\Business Objects\Tomcat55\work) is necessary. Incase deleting the cache also doesn't work, we may have to redeploy the dswsbobje folder.
    To redeploy, follow the steps given below:
    1.     Go to C:\Program Files\Business Objects\Tomcat55\webapps and keep a backup of the dswsbobje folder.
    2.     Now delete this folder and restart Tomcat.
    3.     Restarting Tomcat will recreate the dswsbobje folder but will again default the number of rows fetched by LiveOffice to 512.
    4.     We will again have to follow the steps mentioned in the start to increase the number of rows from 512 to the desired value.
    5.     Restart Tomcat again for the changes to take place.
    Note: Increasing the number to large values might cause inconsistency in the behavior or instability.

  • Help with Radio Buttons & Combo Box for Flash Form that sends email

    I'm having a bit of a hard time with a Flash form that I'm working on.
    I've got the basic text fields working fine, but I'm not sure how to retrieve the values from the Radio Button and Menu List components.
    The PHP script pulls the values from the text fields with:
    $contact_name = $_POST['name'];
    $contact_email = $_POST['email'];
    $contact_subject = $_POST['subject'];
    but using
    $radioGroup = $_POST['radioGroup'];
    doesn't retrieve the selected radio button value.
    The radio buttons have a groupName of "radioGroup". The combo box component doesn't even show up in the HTML version, but does in the .swf.
    Can anyone point me in the correct direction to pull these values from these components and get them passed to the PHP form? The native .FLA and the php file are here for reference:
    http://dl.getdropbox.com/u/21984/flashform.zip
    My solution needs to be ActionScript 2.
    Thanks!

    again, you assign a variable.  the selected radiobutton's data and/or label isn't going to magically be sent to the php file.
    for example, if you have sendLV and receiveLV loadvars instances, you can use:
    sendLV.rbData=yourradiogroup.selection.data;
    sendLV.yourothervariables=yourothervariables;
    sendLV.sendAndLoad("yourphp.php",receiveLV,"POST");

  • Combo-box format static

    I tryed posting this question before with no success, so I
    thought I would
    re-explain.
    i am using a combo box component (using flash mx 2004 pro)
    and have been
    able to customize the fonts, colour, etc. of the list once
    the user clicks
    on the combo box, but can not figure out how to make the
    initial combox
    box text use the embedded font. Any suggestions?
    You can see the combo box in question at :
    63.134.206.80/FRAM-email.html
    thank you
    Tim

    Thanks, that worked great! one more quick question, is there
    a way to
    actionscript the component so that the comboc box doesn't
    have rounded
    corners when it's not selected?
    In article <f2955i$7q1$[email protected]>,
    "proPingu"
    <[email protected]> wrote:
    > _global.style.setStyle("color", 0x0000FF);
    > _global.style.setStyle("themeColor", 0xFFCC00);
    > _global.style.setStyle("fontSize",12);
    > _global.style.setStyle("fontFamily" , "Century Gothic");

  • Combo Box doesn't persist data insertion settings

    Hi,
    I'm simply trying to setup a combo box that places the selected label into a destination table cell. I've tried about every combination possible to simply add a data insertion series. Please note, I AM clicking the plus button to add it to the list shown to the left of the settings. Unfortunately, everytime I have the series added and I click away from the selected combo box it loses the settings I just provided.
    Has anybody else had these frustrating issues with the combo box component?
    Thank you.

    Greg,
    The combo box component can be a bit fiddly at times. It would help if you let me know which version of Xcelsius you are using.
    In any case if you are simply trying to insert the label to a destination you dont need to bother with the series at all. Try it in this order:
    1) Drag a combo box component
    2) In combo box properties pane and click on the range select button beside Labels
    3) Select the range in your excel sheet that has the labels and click OK
    4) Go back to the properties pane and choose Insertion Type: Label
    5) Click the range select button beside Destination and select a cell
    6) To test it drag a Text -> Label compoent in and point it to the destination cell you selected in step 5.
    7) Preview to see if all is in order
    Let me know how you get on.
    Cheers,
    Ryan

  • Locating on a location on GMap using combo box using SDK

    Hi All,
    I have a requirement to locate a city on google map using combo box. I want name of cities to appear in combo box and on selecting a city, map should be able to locate that city. This combo box will be visible on map itself. Combo box can be a component of either Xcelsius or Flex Builder.
    I think combo box dragged from Xcelsius component panel not able to communicate with google map which is embedded in form of swf through manage and packager.
    So, I tried with Flex Builder combo box component, but not able to done it. I am not getting the flow how to communicate between combo box and google map.
    I can locate a particular city giving a latitude and longitude through propertysheet.
    Please, if anyone could help me out asap.
    Thanks in advance!

    Hi Monammed,
    The said functionality should work. Please check your logic one more time. Also, try using some spreadsheet components mapped to the cells in question and understand how the data is flowing during run-time. This will help you test things. Delete spreadsheets when you are done with identifying the issue.
    Lets check the combo box mapping one more time : Map the source of the combo to the entire range; labels in the combo box ONLY to the country column in the source range(typically this may be the left most column in the range); selected item should be mapped to the cell that has the destination for the icon and the type for default selection may be dynamic. Well, if there is any hard-coding of values involved anywhere, do check the spellings and other trivial things.
    Do let me know if this was helpful and if you need any more help.
    Thanks,
    Prasanna

  • Combo box bug

    When I make a selection in my combo box component the opened
    selection box closes however the border of the selection box
    remains visible.
    How can I resolve this?

    After troubleshooting I noticed that this only happens when I
    have deselected the "export in first frame" checkbox in the
    combobox linkage identifier. (had to uncheck this box to set up my
    preloader)
    It would be fantastic if someone could tell me whats going on

  • Tab Component Dynamic Visibility to Combo Boxes

    I am using a Tab component.  I have 3 tabs on my dashboard.  I have 2 Combo boxes that I am using to filter rows of data on 3 Excel sheets.  Both Combo boxes are not used on all the tabs.  How can I pass example: User clicks on Tab 1 and use dynamic visibility for Combo Box 1 and Combo Box 2 are visible.  If the user clicks on Tab 2 I want only Combo Box 1 to be visible.

    Hi Joe,
    This can be achieved in Dynamic visibility.
    On click on Tab,just map to some target(say value "1") and then For Combo box,set target cell mapped for tab to 1,which means when the target cell gets "1",show the Combo box.
    If you are not clear then you can refer the following URL,which will give you more informations about this.
    http://everythingxcelsius.com/2008/08/tip-7-xcelsius-dynamic-visibility-video-tutorial.html
    Rgds,
    Murali

  • 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 change the text color to red in a combo box?

    I'm writing a java program which have a combo box which shows all the name of the member from the database. However, I would like to change the text color of those member who have now currently on-line.
    Please help, it's URGENT. Thanks in advance.
    Clark

    hi,
    as i mentioned, you would require to use a custom renderer for this, for this
    //Class subclass the JFrame and has a JList in it
    import javax.swing.*;
    import java.awt.*;
    import java.util.Vector;
    public class ListRendererTest extends JFrame
         private JList lstMenu;
         private DefaultListModel defaultListModel;
         private JScrollPane scrollPane;
         private Vector listVector;
         public ListRendererTest()
              init();
              addComponents();
              showFrame();
         public void init()
              lstMenu = new JList();
              defaultListModel= new DefaultListModel();
              lstMenu.setModel(defaultListModel);
              scrollPane      = new JScrollPane(lstMenu);
              listVector = new Vector();
              MyListData m1 = new MyListData();
              m1.setName("Rakesh");
              m1.setOnline(false);
              listVector.addElement(m1);
              m1 = new MyListData();   //represents each User instance
              m1.setName("Makesh");
              m1.setOnline(true);
              listVector.addElement(m1);
              for (int i=0;i < listVector.size(); i++)
                   defaultListModel.addElement(((MyListData)listVector.elementAt(i)));
              lstMenu.setCellRenderer(new MyListRenderer());  //set custom renderer
         public void addComponents()
              getContentPane().add(scrollPane,BorderLayout.CENTER);
         public void showFrame()
              setTitle("List renderer test");
              setSize(300,300);
              setLocation(200,200);
              setVisible(true);
         public static void main(String args[])
              new ListRendererTest();
    }The above class is the Container which houses the JList in it, it uses two other classes, MyListData which is used to represent each user instance ( username, and information about whether he is online) and MyListRenderer (custom renderer).
    // Represents each user instance //
    public class MyListData
         private String name;
         private boolean online;
         public void setName(String name)
              this.name = name;
         public String getName()
              return name;
         public void setOnline(boolean online)
              this.online = online;
         public boolean isOnline()
              return online;
    //custom list renderer
    import javax.swing.*;
    import java.awt.*;
    public class MyListRenderer extends DefaultListCellRenderer
         private MyListData myListData;
         public Component getListCellRendererComponent(JList list, Object value, int index,  boolean isSelected, boolean cellHasFocus)
               myListData = (MyListData)value;
               setText(myListData.getName());
               setBackground(myListData.isOnline() ? Color.red: Color.white);  //check if online, if so show in different color
               setForeground(isSelected ? Color.blue : Color.black);
               return this;
    }hope that helps.
    cheerz
    ynkrish

Maybe you are looking for