on my personal quest to learn some Java I have come across another hurdle.
So far I have 2 arrays, the first one is a 1D array with a list of photographic film manufacturers, the second is a 2d array with the following appearance:
Film               Developer    Dilusion   35mm    120    Sheet    Temperature
Kodak T-Max 100,   Ilfosol S,   1+9,       10,     10,    ,        20C
Kodak T-Max 100,   Rodinal RO9, 1+25,      9,      9,     ,        20C
Kodak T-Max 100,   Rodinal RO9, 1+50,      13,     13,    ,        20C
(nb, don't use the above times for developing those films, I've just input any data for this example)
On my JFrame I have a list of JComboBoxes (film, developer, dilution, film format). The film box is populated by the 1D array and I have the following code in an attempt to list the possible developers when a film is chosen. At present this code causes an endless loop requiring a hard reset of my laptop, so something definitely isn't right.
private void filmComboBoxActionPerformed(java.awt.event.ActionEvent evt) {                                             
    // TODO add your handling code here:
    developerComboBox.removeAllItems();
    int count = 0;
    while (count <= rows) {
        if (myArray[0][count] == filmComboBox.getSelectedItem()) {
            developerComboBox.addItem(myArray[1][count]);
            count++;
        }
    }
}          
Any advice on where I am going wrong with this code is much appreciated, once this part is done I will be repeating the code with different string names etc... to populate the dilution field when a developer is selected, then the film format field
Cheers Jim
 
     
     
    