Jlist con Scrollbar en un JOption Message

Por favor que tengo que hacer en el siguiente codigo para que aparezca un scrollbar??? no tengo mucha experiencia y estoy haciendo un programa basado en lo que voy investigando:

Login.rs=Login.conn.ObtenerPrivilegios();
DefaultListModel dml = new DefaultListModel();
JScrollPane menuScrollPane ;
int NroPrivilegios=0;
try {
Login.rs.beforeFirst();
while (Login.rs.next())
{
String valorcombo = (String) cbo_sistema_subsistema.getSelectedItem();
if (Login.rs.getString("nombre_producto").equals(valorcombo)){
dml.addElement(Login.rs.getString("nombre_privilegio"));
NroPrivilegios=NroPrivilegios+1;
String[] Lista=new String[NroPrivilegios];

}
}
} catch (SQLException ex) {
System.out.println("Error: " +ex);
}
if (NroPrivilegios==0){
JOptionPane.showMessageDialog(null, "No hay Privilegios asociados al Producto: " + cbo_sistema_subsistema.getSelectedItem());
txt_privilegio.setText("");
}else{
JList list = new JList<>(dml);

list.setBorder(BorderFactory.createLineBorder(Color.GRAY));
for (MouseListener mouseListener : list.getMouseListeners()) {
list.removeMouseListener(mouseListener);
}
list.addMouseListener(new MouseAdapter() {
public void mouseClicked(MouseEvent e) {
int index = list.locationToIndex(e.getPoint());
if (list.isSelectedIndex(index)) {
list.removeSelectionInterval(index, index);
} else {
list.addSelectionInterval(index, index);
}
}
});
InputMap inputMap = list.getInputMap();
inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_UP, 0),
inputMap.get(KeyStroke.getKeyStroke(KeyEvent.VK_UP, InputEvent.CTRL_MASK)));
inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, 0),
inputMap.get(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, InputEvent.CTRL_MASK)));
inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_BACK_SPACE, 0),
inputMap.get(KeyStroke.getKeyStroke(KeyEvent.VK_SPACE, InputEvent.CTRL_MASK)));
JOptionPane.showMessageDialog(this,list,"Selecciones los Privilegios requeridos:",javax.swing.JOptionPane.QUESTION_MESSAGE);
txt_privilegios.setText(list.getSelectedValuesList().toString());
}