Solved

undocumented layout managers

Posted on 1997-05-19
3
202 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
ID: 1220599
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
ID: 1220600
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
ID: 1220601
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
In this post we will learn different types of Android Layout and some basics of an Android App.
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

749 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