Bug 20707 - JList not respecting LayoutOrientation
Summary: JList not respecting LayoutOrientation
Status: RESOLVED FIXED
Alias: None
Product: classpath
Classification: Unclassified
Component: swing (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: 0.18
Assignee: graydon hoare
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-31 22:51 UTC by Kim Ho
Modified: 2005-10-16 01:47 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2005-07-15 21:19:22


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kim Ho 2005-03-31 22:51:30 UTC
Test case:

import javax.swing.*;
import java.awt.*;

public class testlist
{
        public static void main(String[] args)
        {
                JFrame f = new JFrame();

                DefaultListModel v = new DefaultListModel();
                v.addElement("alsdkfj");
                v.addElement("lasdkfj");
                v.addElement("owieur");
                v.addElement("weoiru");
                v.addElement("lskdfj");
                v.addElement("zcxvn");
                v.addElement("zxcvlkzvm");



                JList a = new JList(v);
                a.setVisibleRowCount(2);
                JScrollPane p = new JScrollPane(a);

                a.setLayoutOrientation(JList.HORIZONTAL_WRAP);


                f.getContentPane().add(p);
                f.pack();
                f.show();

        }
}

The items in the list should be wrapped vertically, not horizontally.
Comment 1 Thomas Fitzsimmons 2005-08-21 17:42:06 UTC
This has been fixed.  Closing.