[2479] in java-interest

home help back first fref pref prev next nref lref last post

What pannel to use for Scrollbars

daemon@ATHENA.MIT.EDU (Bindu Wavell (RUFUS))
Tue Oct 3 02:23:43 1995

To: java-interest@java.sun.com
Date: Mon, 02 Oct 1995 22:15:39 -0600
From: Bindu Wavell (RUFUS) <wavell@taussky.cs.colorado.edu>


First of all, I hope this is the correct mailing list... I'm not sure if
I should be sending this to hotjava-interest or here (since I'm doing 
hotjava development, but the question is strictly for java...) 

I'm trying to use PreBeta JDK to build a simple ui which looks like this:

+-----------------+
|                 |
|                 |
|                 |
|                 |
+-----------------+
|<------->  ## ## |
+-----------------+

where there is a quite wide scrollbar on the bottom left, two buttons on
the bottom right and a canvas which takes up most of the window.  So I
have created a Frame (BorderLayout) and "add"ed a canvas to "Center" and
I have created a pannel which uses FlowLayout which is attached to the
"South" component of the Frame.  If I add a Scrollbar and two Buttons to
the pannel, it works, however I don't appear to have control over the
width of the Scrollbar, to solve this problem, I created a second
pannel, using GridLayout(1, 2) -- which brings up a sub question, why do
some of the examples create GridLayouts(0, x) ...  what is grid with 0
rows?  -- anyhow, I add the Scrollbar to the grid, and then I add a
FlowLayout pannel with two buttons..  anyhow, nothing displays...

What gives? I appear to be missing some simple fact about how controls
are sized in Layouts... Can someone give me a clue?

TIA, Bindu

P.S. Would it be appropriate to post source code to this mailing list?
-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com

home help back first fref pref prev next nref lref last post