Supporting Classes

Java Component Preferred Size

To develop user friendly and good look environment, the layout of the components in a container is very important to the programmer like the selection of colors and fonts for graphics. The user should feel free and comfortable to stay some time in GUI. To give attractive graphical user interface design, the AWT package comes …

Java Component Preferred Size Read More »

Java No Layout Manager setBounds()

We know earlier in "Java Layout Managers" that two styles of placing components in containers – pixel format and position format. Now let us discuss clearly what pixel format is and how to place a component in terms of pixels. We also know earlier, the default layout manager for Frame is BorderLayout and for Panel …

Java No Layout Manager setBounds() Read More »

Java AWT Create Font Object

Important text can be made eye-catching by displaying in attractive fonts. A font represents a combination of a font name (like Monospaced), font style (like bold) and font size (like 20). Following is the class signature public class Font extends Object implements Serializable The Font constructor takes three parameters to create a Font object. Font …

Java AWT Create Font Object Read More »

Java AWT Create Color Object

With colors and fonts, readability increases as important noteworthy topics can be colored. All the latest operating systems support colors and fonts and allow customizing also. To support colors and fonts, the java.awt package includes Color class and Font class. Standard Color Models Color can be specified in two formats – RGB and HSB. 1. …

Java AWT Create Color Object Read More »