0

ちょっとした質問があります。私が取り組んでいる JScrollPane があり、幅が広がるだけです。しかし、代わりに、高さを拡大したいと思います。

private void setImageLibPanel() {
ExtraScrollPanel = new JPanel();
MidLeftPanel.removeAll();
if (project.getImgCount() > 0) {
    for (int i = 0; i < project.getImgCount(); i++) {
        JLabel temp = new JLabel();
        ImageIcon tempIcon = project.getNextImage();
        temp.setIcon(tempIcon);
        ExtraScrollPanel.add(temp);
    }
}
JScrollPane imageLibScrollPane = new JScrollPane();
imageLibScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
imageLibScrollPane.setAutoscrolls(true);
imageLibScrollPane.setViewportView(ExtraScrollPanel);
MidLeftPanel.add(imageLibScrollPane, BorderLayout.CENTER);

これどうやってするの?

よろしく、 ブラックマジック

4

1 に答える 1