I just can’t get reasonable times using Swing and the bulk of the delay as far as I can make out is simply the construction of a JComboBox (even JComboBox – new JComboBox() with no attempt to do more), at least where there can be 100 or more options. An equivalent on Android would get through in under a second but I can be up to 30 seconds on Swing.
Hmmm, I have a swing jframe with a jscrollpane and a jbutton in it. Clicking on the button calls this action routine:
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
int number = 100;
String ] testString = new String[number];
for (int i=0;i<number;i++)
{
testString*="Long text number "+i;
}
javax.swing.JComboBox<String> testCombo=new javax.swing.JComboBox<>(testString);
this.jScrollPane1.getViewport().add(testCombo);
}