I cannot display the JList
in the JScrollPane
when it's inside the ActionListener
. I have another list that prints without problems in another scroll pane, but not in action listener.
btnSelecteazaBd.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
String t = new String();
t = list.getSelectedValue().toString();
try {
w = cautaTabele(t);
} catch (SQLException ex) {
Logger.getLogger(Conexiune.class.getName()).log(Level.SEVERE, null, ex);
}
listaTabele = new JList(w);
listaTabeleScrollPane = new javax.swing.JScrollPane(listaTabele);
}
});