|
-
Mar 7th, 2002, 07:03 PM
#1
Thread Starter
Fanatic Member
layout managers
hi
what would you say are the best and the worst layout managers i need to use some for my project, but i only know of
GridLayout
FlowLayout
BorderLayout
and they don't seem to do quite what i want
Cheers
Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen a angry penguin charging at them in excess of 100mph. They'd be a lot more careful about what they say if they had.
-- Linus Torvalds
[ Galahtech.com] | [ My Site] | [ Fishsponge] | [ UnixForum.co.uk]
-
Mar 7th, 2002, 11:05 PM
#2
Dazed Member
CardLayout is cool but i haven't had
a need for it yet. The most flexible
layout manager seems to be the
GridbagLayout but the most complex.
I like just setting the LayoutManager to
null and use absoulte positioning, but
i heard that isn't a good idea because of
cross platform issues.
-
Mar 8th, 2002, 05:56 AM
#3
Thread Starter
Fanatic Member
Originally posted by Dilenger4
CardLayout is cool but i haven't had
a need for it yet. The most flexible
layout manager seems to be the
GridbagLayout but the most complex.
I like just setting the LayoutManager to
null and use absoulte positioning, but
i heard that isn't a good idea because of
cross platform issues.
yeah we aren't allowed to use absolute posistioning for that reason, how many layout managers are there ?
Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen a angry penguin charging at them in excess of 100mph. They'd be a lot more careful about what they say if they had.
-- Linus Torvalds
[ Galahtech.com] | [ My Site] | [ Fishsponge] | [ UnixForum.co.uk]
-
Mar 8th, 2002, 10:58 AM
#4
Addicted Member
BorderLayout
BoxLayout
CardLayout
FlowLayout
GridBagLayout
GridLayout
and the new...
SpringLayout
Ford? Theres an infinite number of monkeys outside that want to talk to you about a script of hamlet they've produced!
-
Mar 8th, 2002, 12:41 PM
#5
Thread Starter
Fanatic Member
i haven't got JDK 1.4 yet and i am assuming that SpringLayout is in it, so what does that one do it sounds interesting
Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen a angry penguin charging at them in excess of 100mph. They'd be a lot more careful about what they say if they had.
-- Linus Torvalds
[ Galahtech.com] | [ My Site] | [ Fishsponge] | [ UnixForum.co.uk]
-
Mar 8th, 2002, 01:30 PM
#6
Addicted Member
Some aren't aware of this, but you can combine layout managers. For example, you could set up a BorderLayout, then in Center, you could put a text box, then in the South, you could put a FlowLayout and place buttons in that.
Also, I haven't worked with it, but I hear that the IDE's do a good job of juggling the layout managers for you--you focus on the physical design and the IDE will build the requisite code for you. Good IDE's use FlowBagLayout with all of it's nuances and complexities.
cudabean
-
Mar 8th, 2002, 02:29 PM
#7
Dazed Member
Posted by Cudabean
Some aren't aware of this, but you can
combine layout managers. For example,
you could set up a BorderLayout, then
in Center, you could put a text box, then
in the South, you could put a FlowLayout
and place buttons in that.
Providing you use panels and set
the layout managers accordingly.
-
Mar 8th, 2002, 03:55 PM
#8
Thread Starter
Fanatic Member
Originally posted by Cudabean
Some aren't aware of this, but you can combine layout managers. For example, you could set up a BorderLayout, then in Center, you could put a text box, then in the South, you could put a FlowLayout and place buttons in that.
Also, I haven't worked with it, but I hear that the IDE's do a good job of juggling the layout managers for you--you focus on the physical design and the IDE will build the requisite code for you. Good IDE's use FlowBagLayout with all of it's nuances and complexities.
cudabean
quite a few people are aware on our course that you can put layout managers within others, but we aren't allowed to used IDEs to manage ours, this may seem harder but in the long term it will benefit us because we will be able to do them without an IDE and anyone can use an IDE really
Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen a angry penguin charging at them in excess of 100mph. They'd be a lot more careful about what they say if they had.
-- Linus Torvalds
[ Galahtech.com] | [ My Site] | [ Fishsponge] | [ UnixForum.co.uk]
-
Mar 10th, 2002, 01:25 PM
#9
Addicted Member
Originally posted by zmerlinz
SpringLayout, what does that one do
Haven't had a chance to play with it yet but there is a sun tutorial on it if you want to look into it.
its here http://java.sun.com/docs/books/tutor...ut/spring.html
a brief snippet that could be useful
Spring layouts do their job by defining relationships between the edges of components. For example, you might define that the left edge of one component is a fixed distance (5 pixels, say) from the right edge of another component. By default, a spring layout defines the width and height of a component (the distance between its left and right edges and between its top and bottom edges) to be somewhere between the component's minimum and maximum sizes -- if possible, at its preferred size.
Ford? Theres an infinite number of monkeys outside that want to talk to you about a script of hamlet they've produced!
-
Mar 10th, 2002, 07:17 PM
#10
Hyperactive Member
I'm using BoxLayout; it's what Mark advised to use for the project
-
Mar 13th, 2002, 04:23 AM
#11
Thread Starter
Fanatic Member
i had a look at boxlayout last night as i thought i could of used it in my work, but in the end it proved to be more hassle than it was worth, so i just stuck with gridlayout.
BTW my project is finished now
Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen a angry penguin charging at them in excess of 100mph. They'd be a lot more careful about what they say if they had.
-- Linus Torvalds
[ Galahtech.com] | [ My Site] | [ Fishsponge] | [ UnixForum.co.uk]
-
Mar 13th, 2002, 02:56 PM
#12
Hyperactive Member
-
Mar 20th, 2002, 11:46 AM
#13
Member
-
Mar 21st, 2002, 05:36 PM
#14
-
Mar 21st, 2002, 10:19 PM
#15
Member
Munkeh Munkeh Munkeh Munkeh Munkeh Munkeh Munkeh Munkeh Munkeh Munkeh Munkeh Munkeh Munkeh Munkeh Munkeh Munkeh Munkeh Munkeh Munkeh Munkeh Munkeh Munkeh Munkeh Munkeh Munkeh Munkeh Munkeh Munkeh Munkeh Munkeh Munkeh Munkeh Munkeh Munkeh Munkeh Munkeh
Anyway...... Did Mark ever tell you if he was going to do any GridBagLayout with you? I doubt he will, but you never know
-
Mar 22nd, 2002, 11:34 AM
#16
Hyperactive Member
Don't think he will, he hasn't mentioned it
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|