Jlist SINGLE_SELECTION

0 respostas
L

Olá,

Estou setando o modo de seleção para seleção única, mas não está tendo efeito, está correto como estou fazendo abaixo?

lista=new JList();	
		lista.setCellRenderer(new CheckBoxCellRenderer());
		lista.setListData(opcoesResposta); 		 
		Font font1 = new Font ("SansSerif", Font.BOLD, 12);
        lista.setFont(font1); 
        lista.setForeground(Color.darkGray); 
        lista.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        lista.setBackground (Color.blue);
        lista.setForeground (Color.green);
Criado 16 de fevereiro de 2011
Respostas 0
Participantes 1