Solved

undocumented layout managers

Posted on 1997-05-19
3
201 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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone 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

Suggested Solutions

Title # Comments Views Activity
object oriented programming comparison 5 77
SHA2 certs for IIS AND Java? 2 113
runtime exception 2 41
null output 3 35
For customizing the look of your lightweight component and making it look lucid like it was made of glass. Or: how to make your component more Apple-ish ;) This tip assumes your component to be of rectangular shape and completely opaque. (COD…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
This video teaches viewers about errors in exception handling.

839 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