amvm Posted June 5, 2012 at 07:38 PM Report Share #460673 Posted June 5, 2012 at 07:38 PM Boa tarde, não percebo o porquê de não conseguir mostrar o scrollpane numa JList... String[] info = {"Lista vazia!!"}; JPanel flow = new JPanel(new FlowLayout()); flow.setBorder(BorderFactory.createTitledBorder("Chaves primárias:")); //cria uma JList com o nome dos campos inseridos nomeCampos = new JList(info); nomeCampos.setPreferredSize(new Dimension(150, 10)); //permite que sejam seleccionados varios campos nomeCampos.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); JScrollPane jsp = new JScrollPane(nomeCampos); flow.add(jsp); panel.add(flow); esse panel está inserido num grid que, por sua vez, está inserido no centro de um borderLayout(). alguém sabe o que está mal? cumprimentos Link to comment Share on other sites More sharing options...
Rui Carlos Posted June 6, 2012 at 04:22 PM Report Share #460972 Posted June 6, 2012 at 04:22 PM Não há umas propriedades de tamanho que podes definir (e.g. tamanho mínimo)? Experimenta começar por aí. Rui Carlos Gonçalves Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now