Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / June 2007

Tip: Looking for answers? Try searching our database.

Full Size text areas in a scroll pane

Thread view: 
Peter Ashford - 16 Jun 2007 16:29 GMT
Hi All

I'm not quite sure how to get the effect I'm looking for with Swing.
I want to display a list of comments in their entirety in a scroll
pane.

Each comment is a panel with a text area and a couple of labels (date
and user who made the comment)

I want to have a number of these components (stacked vertically)  on a
panel in a scroll pane.  I want each comment to display at full size
(i.e.: no scroll pane within the text areas themselves).

Anyone got any ideas how to do that?
Peter Ashford - 17 Jun 2007 06:28 GMT
> Hi All
>
[quoted text clipped - 10 lines]
>
> Anyone got any ideas how to do that?

noone?
Andrew Thompson - 17 Jun 2007 08:19 GMT
...
>> Anyone got any ideas how to do that?

Sure.  I have some ideas - even opened the editor and
typed a few lines, but have other things to do, and started
doing them..

>noone?

A Y_AXIS BoxLayout for each record (comment/name/date),
with a crude algrithm to make a JTextArea according to the
size of the String that is the comment?

( And note that if you do not get a full and complete
answer within 24 hours of asking - it's free! ;)

Signature

Andrew Thompson
http://www.athompson.info/andrew/

Roedy Green - 29 Jun 2007 16:54 GMT
On Sat, 16 Jun 2007 08:29:11 -0700, Peter Ashford
<peter.m.ashford@gmail.com> wrote, quoted or indirectly quoted someone
who said :

>I'm not quite sure how to get the effect I'm looking for with Swing.
>I want to display a list of comments in their entirety in a scroll
[quoted text clipped - 8 lines]
>
>Anyone got any ideas how to do that?

I hate text for this sort of thing.  A picture would instantly
describe what you are trying to do.

I think you might want a JTree. Then you can have columns of
components that line up nicely, like a spreadsheet. They may or may
not scroll.

see http://mindprod.com/jgloss/jtree.html

This is a one of the hairier Swing components.  Dig around for as many
coding examples as your can.
--
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.