Hi

Thanks for the link but I have already looked at this. It does not do what I
want, all it does make the scrollbars visible or not but does not restrict
the flow of JCheckBox's

Cheers

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of jfsigal
Sent: 24 February 2009 09:27
To: Free Java Programming Online Training Course By Sang Shin
Subject: [java programming] Re: Swing JPanel Layout Managers


check out the link provided if it helps you,(there some scrollbar
policy that you decide if horizontal or vertical scrollbars wants to
appear ont your scrollpane)
http://java.sun.com/docs/books/tutorial/uiswing/components/scrollpane.html#s
crollbars

On Feb 24, 11:14 am, "craig.mckeeman" <[email protected]>
wrote:
> Hi
>
> I am trying to create a JPanel that has dynamically added JCheckBox's.
> The original design used FlowLayout manager (the default). This was OK
> to start with as there was only a handful of JCheckBox required,
> resizing the JFrame and likewise the JPanel enabled more columns of
> JCheckBox's across the screen. The problem now is the requirements
> have changed and I now need to have a lot more JCheckBox's. I tried
> adding a JScrollPane but this has meant the JCheckBox's are all in one
> row with only a horizontal scroll bar, what I really want is to have
> the columns of JCheckBox's which can be resized (1,2,3,n columns wide
> depending on size of JPanel) and only a vertical scrollbar.
>
> I have tried the GridLayout but this is not flexible enough as the
> scroll bars appear for both horizontal and vertical as the amount of
> columns are set at design time.
>
> Do I have to create my own Layout Manager or Scoll Pane or both?
>
> Any help would be greatfully received
>
> Craig





--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/javaprogrammingwithpassion?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to