我正在尝试用字符串数组的值填充我的 Jcombobox,但是在运行它时,我的组合框仍然是空白,下面是我的代码
package UI;
import Class.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.io.*;
import java.util.Scanner;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.ButtonGroup;
import javax.swing.JComboBox;
import javax.swing.JFileChooser;
import javax.swing.JOptionPane;
public class Smith_waterman extends javax.swing.JFrame {
private String[]algorithm_name = {"Needleman & Wunsch (global alignment)","Smith & Waterman (local alignment)"};
private PairwiseAlignmentAlgorithm[] algorithm = {new NeedlemanWunsch(),
new SmithWaterman(),
};
/**
* Creates new form main_menu
*/
public Smith_waterman() {
initComponents();
algorithm_combo = new JComboBox(algorithm_name);
有人可以告诉我如何解决这个问题