Home  >  Article  >  Java  >  How about java frame

How about java frame

little bottle
little bottleOriginal
2019-05-18 18:33:323162browse

A frame in Java is a top-level window with a title and border, and the size of the form includes all the areas specified for the border. The default layout of the form is "BorderLayout".

How about java frame

#Java is a computer programming language. It has many tools available for developers to use. Below I will introduce to you the frame in Java.

Frame is a top-level window with a title and borders.

The size of the form includes all areas specified for the border.

The dimensions of the border area can be obtained using the getInsets method, however, because these dimensions are platform-dependent, a valid insets value will not be obtained until the form is made displayable by calling pack or show.

Because the total size of the form includes the border area, the border actually obscures part of the form and limits the area available to render and/or display subcomponents within a rectangle , the position of the upper left corner of the rectangle is (insets.left, insets.top), the width is width - (insets.left insets.right), and the length is height - (insets.top insets.bottom).

The default layout of the form is BorderLayout.
Using setUndecorated, the form can turn off native decoration (i.e. Frame and Titlebar). But this can only be done if the form is not displayable.

In a multi-screen environment, you can create a Frame on different screen devices by constructing a Frame using Frame(GraphicsConfiguration) or Frame(String title, GraphicsConfiguration).

The GraphicsConfiguration object is one of the GraphicsConfiguration objects of the target screen device.

The above is the detailed content of How about java frame. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn