Frame : Java Glossary

go to home page F words local find full screen, hide local find menu Google search web for more information on this topic jump to foot of page translate this page with Babelfish by Roedy Green ©1996-2009 Canadian Mind Products
index page for letter ⇒ punctuation 0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z (all)
Frame
A Window with controls on it such as optional resizing buttons, an icon, a menubar and a title.

When you specify the frame size, make it 16 pixels wider and 36 pixels taller than you need for the contents to allow room for the top frame bar. To add to the confusion, the origin is in the top corner under the frame bar. So you must add 36 to all your y co-ordinates inside a frame.

Frame State

// turn off the entire frame bar, including title, close, minimize, resize...
frame.setUndecorated( true );

// turn off just resizing controls
frame.setResizable( false );
// You can control the current state of the Frame,
// but you cannot disable the corresponding user controls.
// To control the widgets, use a JInternalFrame.

frame.setExtendedState( NORMAL );
frame.setExtendedState( ICONIFIED );
frame.setExtendedState( MAXIMIZED_HORIZ );
frame.setExtendedState( MAXIMIZED_VERT );
frame.setExtendedState( MAXIMIZED_BOTH );

Debugging Harness

Here is a typical debugging harness you would append to every Frame you write.
Frames are unusually tricky to close.

The Swing equivalent of a Frame is called a JFrame.

The term frame has a different meaning in datacommunications. Data are usually transmitted in bursts. Each burst is called a frame. It usually has some additional information such as the frame number, the size of the block, the error-checking code and markers for the start and end.

In HTML, frame refers to the independently scrollable panels on your browser screen.

Learning More

Sun’s Javadoc on the Frame class : available:

CMP homejump to top
CMP logo
feedback Please email your feedback for publication, errors, omissions, broken/redirected link reports
and suggestions to improve this page to Roedy Green : feedback email
made with CSS
HTML Checked!
ICRA ratings logo
mindprod.com IP:[65.110.21.43]
Your face IP:[38.103.63.58]
You are visitor number 18,811.
You can get a fresh copy of this page from: or possibly from your local J: drive (Java virtual drive/mindprod.com website mirror)
http://mindprod.com/jgloss/frame.html J:\mindprod\jgloss\frame.html