JScrollPane problem in VEhttps://www.eclipse.org/forums/index.php/mv/msg/208306/667335/#msg_667335
I have a JFrame VE dialog with a JList.
I need to fill the list after in has been initialized so I create
the JList with a DefaultListModel object in the constructor.
Then i add elements to the DefaultListModel object.
The elements are displayed in the list, BUT no vertical scrollbar appears
so the lowest part of the elements are invisible.

I have tried lots of settings in the methods of the JList and JScrollPane classes
but the damn scrollbar refuses to appear!

If anybody could tell how to get the vertical scrollbar in the JList
then I would be very grateful and happy!

Thanks in advance!]]>Ulf2011-04-28T08:01:34-00:00Re: JScrollPane problem in VEhttps://www.eclipse.org/forums/index.php/mv/msg/208306/668080/#msg_668080
I'd like you know VE is in maintenance stage since 2008. Insight of a new
coming WindowBuilder, this project will be archived. I recommand you to
switch on WindowsBuilder if it is possible. If you insists on the support of
VE, please contact me directly.

Best regards
Yves YANG
"Ulf" <het_post_punkt_com@hotmail.com> wrote in message
news:ipb6e3$lju$1@news.eclipse.org...
> Hi,
>
> I have a JFrame VE dialog with a JList.
> I need to fill the list after in has been initialized so I create the
> JList with a DefaultListModel object in the constructor.
> Then i add elements to the DefaultListModel object. The elements are
> displayed in the list, BUT no vertical scrollbar appears so the lowest
> part of the elements are invisible.
>
> I have tried lots of settings in the methods of the JList and JScrollPane
> classes
> but the damn scrollbar refuses to appear!
>
> Here is my current code in the method that initializes the JList:
>
> /**
> * This method initializes itemList * * @return javax.swing.JList */
> private JList getItemList() {
> listModel = new DefaultListModel();
> if (itemList == null) {
> itemList = new JList(listModel);
> itemList.setBounds(new Rectangle(27, 83, 274, 242));
> itemList.setLayoutOrientation(JList.VERTICAL);
> itemList.setVisibleRowCount(-1);
> listScroller = new JScrollPane();
> listScroller.setViewportView(itemList);
> listScroller.setVerticalScrollBarPolicy(JScrollPane.VERTICAL
> _SCROLLBAR_ALWAYS);
> listScroller.setBounds(new Rectangle(27, 83, 274, 242));
>
> // TEMP TEST:
> listModel.addElement("foo bar foo bar 1");
> listModel.addElement("foo bar foo bar 2");
> listModel.addElement("foo bar foo bar 3");
> .
> .
> listModel.addElement("foo bar foo bar 50"); itemList.revalidate();
> }
> return itemList;
> }
>
> If anybody could tell how to get the vertical scrollbar in the JList
> then I would be very grateful and happy!
>
> Thanks in advance!
> --
> SilentMajority]]>Yves YANG2011-05-03T16:25:08-00:00Re: JScrollPane problem in VEhttps://www.eclipse.org/forums/index.php/mv/msg/208306/668087/#msg_668087
Thank you for the tip about WindowsBuilder. I am checking it out and it seems really cool!

However, if there is an easy solution to my scrollbar problem in VE I would be very glad to know about it, since I would need to deliver my GUI soon. I also have the same problem with missing scrollbars in a JTextArea.

If you know anyting about how to solve this in VE I would be very grateful.

You said I could contact you directly, but how do I find your mail address? I could not see it in your profile.