I will try that out Pete, Thanks
My program structure is like this-
I created a New Project ->
Java Application -> New JFrame Form in the Package.
Then I designed the GUI with all the components.
The GUI Source is something like this ->
public class CSGenerator extends javax.swing.JFrame
{
public CSGenerator()
{
initComponents();
}
//ActionPerformed Methods of some of the components.
private void initComponents()
{
//Automatically Generated Code
jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new
String[] { "1", "12", "123" })); //HardCoded Values
//Automatically Generated Code
}
public static void main(String args[])
{ // Main Method with the run() function}
//Variables Declaration
}
As you can see, The setModel method is in the Automatically generated code and the only way to Customize that particular code is by going to the Customize Code property of the JComboBox component. But I can't figure out where do I write my PopulateCurrencies() Method and then pass the curr[] array to the DefaultComboBox Model object.
[ April 29, 2008: Message edited by: Ashutosh Deo ]