Solved

undocumented layout managers

Posted on 1997-05-19
3
204 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

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…
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
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:
Suggested Courses

623 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