Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

What are inset values, and how do I set them?

inset values
0
Posted

What are inset values, and how do I set them?

0

Ans : Inset values specify how much of a container’s space is reserved for a border, inside of which the container’s components are arranged; you set these values by overriding getInsets (or insets in JDK 1.0.2) in your own Container subclasses. Each container, for example a Frame instance, Panel instance, or Applet instance, provides a rectangular space in which to position the container’s components. In the default case, the components in a container can occupy the full space of the container. Inset values, represented as an instance of the Insets class, allow you to specify an amount of space at one or more marginsa boundary inside which all components must be placed. For example, a top inset of 10 means that a component’s top edge can be placed no higher than 10 units (the space covered by 10 pixels) from the top of the container. Inset values are useful for containers that have border material surrounding their content area. The Frame class, for instance, provides top-level window

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123