How do you do 2 columns, one scrollable?

From: VisionSet (spam_at_ntlworld.com)
Date: 12/28/03


Date: Sun, 28 Dec 2003 22:31:06 -0000

I would like to display 2 columns of many rows.
the left column will be fixed in the horizontal and should display all its
contents, each cell will be a single JLabel
the right column will be scrollable (ie all right-hand cells together) each
cell will be a single JComponent with graphics

ie:

--------------------
| | |
--------------------
| | |
--------------------
| | |
--------------------
| | |
--------------------
| | |
--------------------
       <-scrollbar->

One solution is to have 2 components 1 for each column and gridlayout them.
the right-hand one can be nested in a jscrollpane.

But the neccessary scrollbar would interfere with the bottom cell, so it'd
be best to put it below.

I see that I can get the scrollbar from the scrollpane. So that shouldn't
be a problem.

But is there a better way?
I haven't used JTables, can these do this? Had a quick look but don't see
any mention of scrollbar policy.

Thanks.

-- 
Mike W


Relevant Pages

  • Re: TableCellEditor Questions
    ... > I'm trying to create a table cell editor for a JTable that displays a cell ... > circumstances for a renderer to display a working horizontal scrollbar? ... and I don't see a reason why a JScrollPane will not scroll by itself. ...
    (comp.lang.java.gui)
  • Re: Linking Scrollbar Min and Max values to worksheet cells
    ... I am not a Controls expert, ... I used cell $A$1 for the minimum value of the scrollbar, ... I left the scrollbar named as "ScrollBar1". ... Dim rngScrollMin As Range 'Cell that contains Scrollbar minimum. ...
    (microsoft.public.excel.programming)
  • TableCellEditor Questions
    ... I'm trying to create a table cell editor for a JTable that displays a cell ... circumstances for a renderer to display a working horizontal scrollbar? ... listener on the scrollpane (my TableCellEditor extends JScrollpane) OR on ... if anyone can point me to additional online tutorials on editors ...
    (comp.lang.java.gui)
  • Re: Slider bar continues to increment when mouse hovers over arrow
    ... Perhaps you could use a scroll bar from the Control ... It has a cell link, like the one from the Forms Toolbar. ... You are correct in that I mean a scrollbar. ... With the scroll bar, does the slider move? ...
    (microsoft.public.excel)
  • Excel VBA Userforms - especially check boxes
    ... *There have been 3 homework assignments. ... If I tick a checkbox I want Excel to put TRUE in the ... corresponding cell. ... scrollbar as I drag it. ...
    (microsoft.public.excel.programming)