[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: need a swing ref
Sometimes lady luck looks down and grins. Friday afternoon around 4:55 pm
was one of those times.
We had subclass a Java Canvas object which is an AWT, heavyweight object.
The rest of the project is a Swing app. Ouch! I created a different class,
same code, subclassing JPanel instead. After creating that object I then
added a JScrollPane object in the class that was referencing the Canvas and
instead passed the new JPanel class into it as part of its constructor. I
also set the policy in the constructor and amount to increment when it
moves.
And it works! It took me 2 days to learn about this and this was a pain
just to add scrollbars!
gotta run,
dw
----- Original Message -----
From: <ktm@speakeasy.net>
To: "David Wible" <davdouglas69@hotmail.com>; <ajug-members@ajug.org>
Sent: Wednesday, August 06, 2003 6:32 PM
Subject: Re: need a swing ref
>
> 2 great swing resources are the java tutorial:
> http://java.sun.com/docs/books/tutorial/uiswing/components/scrollpane.html
>
> and the java developer's almanac:
> http://javaalmanac.com
>
> You typically don't plop scrollbars down on your app.
> Instead, you make some existing widget "scrollable" by sticking it into
> a JScrollPane.
>
> TTFN.
> Kit
>
> > -----Original Message-----
> > From: David Wible [mailto:davdouglas69@hotmail.com]
> > Sent: Wednesday, August 6, 2003 09:23 PM
> > To: ajug-members@ajug.org
> > Subject: need a swing ref
> >
> > I'm a Swing virgin and I'd like to modify a Swing app!
> >
> > I want to add some scroll bars to the app. Would someone please tell me
how
> > and where to add these? A code snippet if you have it and an indication
> > where to add it.
> >
> > Thanks,
> >
> > David
> >
> > _________________________________________________________________
> > MSN 8 with e-mail virus protection service: 2 months FREE*
> > http://join.msn.com/?page=features/virus
> >
> >
>
>
>