pack is a method of Window, and validate of Container. Thus you can use pack on Frames but not Panels. validate works on Panels and Frames.
pack makes its Window displayable but not necessarily visible. Displayable means it has been hooked into the native GUI (Graphic User Interface), any peer objects have been created, and addNotify has been called.
Packing also refers to bundling together several fields into a larger one. This used to be a common thing to do, but today it is used only when RAM (Random Access Memory) is tight. You do it with shifts << >>> and logical ors |. For example you could pack a (a four bit field) and b (a two bit field) into a 16 bit short c, like this:
// packing a (4 bit field) and b (2 bit field) into c (a 16-bit short) // slide a to left to make room for b and plop a to the left of b short c = (short) ((a << 2) | b);
|
|
You can get the freshest copy of this page from: | or possibly from your local J: drive (Java virtual drive/mindprod.com website mirror) |
| http://mindprod.com/jgloss/pack.html | J:\mindprod\jgloss\pack.html | |
![]() | ||
| Canadian Mind Products | ||
| mindprod.com IP:[65.110.21.43] | ||
| view Blog | Your face IP:[38.107.179.212] | |
| Feedback | You are visitor number 44,242. | |