Solved

undocumented layout managers

Posted on 1997-05-19
3
198 Views
Last Modified: 2008-10-12
I found HorizBagLayout OrientableFlowLayout VariableGridLayout VerticalBagLayout in classes.zip (1.1.1)
but I cannot find any documentation.  Where is the API reference and how are these used?
0
Comment
Question by:olywa
  • 2
3 Comments
 

Accepted Solution

by:
Ferris earned 100 total points
Comment Utility
You should look in the documentation under the package sun.awt

For more information, hit http://www.cdt.luth.se/java/doc/sun/shared/Package-sun.awt.html

You should find the regular documentation there.

Good luck...
0
 

Author Comment

by:olywa
Comment Utility
I have found the same three APIs at a different location.  I was hoping for more of a how-to-use them answer.  I have found no documentation for OrientableLayout anywhere.
0
 

Expert Comment

by:Ferris
Comment Utility
I have a feeling that these Layout Managers may not be implicitly intended for a programmer's use.  I've taken the first two Java programming courses from Sun and there was no documentation for them either.

If I was going to use VariableGridLayout, for instance, I would use it like I use GridLayout.  Without looking at the spec, I suspect that I will be allowed to set variable column widths.  I don't know if I'll be able to set variable row heights yet...  Here goes:

// Create a panel
Panel p = new Panel();
VariableGridLayout vgl = new VariableGridLayout( 1 , 2 , 5 , 5 ) );
p.setLayout( vgl );

// I'd add my components here
Label l = new Label( "Label" );
Button b = new Button( "Button" );

// Say you want to make the button twice as wide as the Label
vgl.setColFraction( 2, .67 );

// the above line says to me, make the second column 2/3 the
// width of the entire grid.

p.add( l );
p.add( b );
add( p );


Try the above and see if it works.  I've never used sun.awt as a package before and I'm still not certain if we're supposed to implicitly use it.

Good luck...
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now