Re: looking JScrollPane method to default to bottom of list



Justin wrote:
I have a JScrollPane that holds a JPanel which I am appending items to.
I would like the JScrollPane to automatically scroll to the bottom so
the newly added element will be immediatly visible instead of forcing
the user to manually scroll down. I was looking through the method
list descriptions, but didnt see any. Wondering if I was mistaken or
if not, how to write code to force it to the bottom.

JScrollPane has the method
public JViewport getViewport();
Look up the API doc of JViewport for a method that suits your need.

--
Thomas
.



Relevant Pages

  • looking JScrollPane method to default to bottom of list
    ... I have a JScrollPane that holds a JPanel which I am appending items to. ... I would like the JScrollPane to automatically scroll to the bottom so ...
    (comp.lang.java.programmer)
  • Re: CEdit Question
    ... >it to automatically scroll to the bottom, ... >a GetScrollRange, SetScrollPos combo buts its not working quite right. ...
    (microsoft.public.vc.mfc)
  • Re: End of smit screen shortcut?
    ... "The notion that we can dismiss the views of all previous thinkers surely leaves no basis for the hope that our own work will prove of any value to others." ... Does anyone know how to scroll to the bottom of a long smit screen, like after many installp messages when the screen status changes to OK when it's done. ... How to I automatically scroll to the bottom of the page, is there a key sequence for this? ...
    (AIX-L)
  • Re: JTable column headers at the bottom?
    ... >> Is there any way to get a JTable to display its column headers along the ... >> bottom of the table rather than the top? ... > Note that if you need the JTable to be inside a JScrollPane, ... > method would otherwise add the TableHeader of the Table as the RowHeader ...
    (comp.lang.java.gui)
  • Re: JTable column headers at the bottom?
    ... > Is there any way to get a JTable to display its column headers along the ... > bottom of the table rather than the top? ... Note that if you need the JTable to be inside a JScrollPane, ... method would otherwise add the TableHeader of the Table as the RowHeader ...
    (comp.lang.java.gui)