Hi i have 50 customers in the database. I am pulling the customer names as an array and passing to JComboBox. but the problem is, it is by default displaying the first element in the array. but i want to display a string like "Select Customer" as the default value. so that customer name will be choosen. It is because i have to perform some actions on "on selecting an item".
kindly help. thanks in advance.
So just make the first element of your array be a string with the text "Select Customer". If you want you can even remove this first item from your combo box when the user select a customer name.