samar
Java component
1 Answer(s)      2 years and 7 months ago
Posted in : Java Interview Questions

What is the preferred size of a component?
View Answers

October 27, 2010 at 12:02 PM


Hi,

Here is the answer,

The preferred size of a component is the minimum component size that will allow the component to display normally.

When frames or containers are designed using layout managers, each layout manager imposes certain rules on how the components within the container must be placed and sized. Components cannot impose their required size on the layout manager hence they use the "preferred size" attribute to suggest to the layout manager of what wud be the ideal size/location to display them.

Thanks.









Related Pages:
Java component
Java component  What is the preferred size of a component
Java component class
Java component class  Which method of the Component class is used to set the position and size of a component
Container or Component - Java Beginners
about the realtionship between Components and Containers in Java GUI? 1) a component is a subclass of a container which means any container can hold a component 2) a component is allowed to hold other components including containers. 3
Component gui - Java Beginners
Component gui  Can you give me an example of Dialog in java Graphical user interface?  Hi friend, import javax.swing.*; public...://www.roseindia.net/java/example/java/swing/ Thanks
JSlider Component of Java Swing
JSlider Component of Java Swing     ... component of Java Swing. A Slider is a Swing tool which you can use for selecting.... In this program, events on the JSlider component have also been shown. If you increase
Create a JComboBox Component in Java
Create a JComboBox Component in Java   ... Component of swing in java. The JComboBox is used to display drop-down list...;frame = new JFrame("Creating a JComboBox Component
Create a JSpinner Component in Java
Create a JSpinner Component in Java   ... a JSpinner component of swing. The JSpinner provides the up-down arrow buttons which... an appropriate JSpinner component on the frame. The following figure shows
Create a JList Component in Java
Create a JList Component in Java   ... component of swing. JList is a component of GUI. It provides the multiple items... easily add or remove items from or to the JList component of swing. The JList
Making a component drag gable in java
Making a Component Draggable in Java       In this section, you will learn how to make a component draggable in java. This program provides the drag and drop feature from one
component creation - Java Server Faces Questions
component creation  Hi, How to create components in JSF. I need a table component,i want to use this component in morethan 2 forms. Give me solution. Thanks in advance.   Hi friend, I am sending you a link
Show Time in JSpinner Component
Show Time in JSpinner Component   ... of a JSpinner Component with time. Here, you will see time is increased... the time and change hour from 1 to 12. Following image shows you a JSpinner component
Common Component Methods
Common Component Methods      ... getLocation() - This method is used to get position of the component, as a Point... here is that if you are working on Java 2 Platform then you need not to create
Setting the Dimensions of an Item in a JList Component in Java
Setting the Dimensions of an Item in a JList Component in Java..., you will learn about setting the dimensions of the List component in java... in a List Component. This provides setting the dimension of items present
Disabling Keyboard Editing in a JSpinner Component
, you will see how to create a non editable Spinner component of Java Swing. You... in the Spinner component of java. The JSpinner component, which is disable... Disabling Keyboard Editing in a JSpinner Component
How to add icons on a button or any component in java - Java Beginners
How to add icons on a button or any component in java  How to add icons on a button or any component in java?  Hi, import...); } } ------------------------------------------ Visit for more information. http://www.roseindia.net/java/example/java
Customize the Icon in a JCheckBox Component of Java Swing
Customize the Icon in a JCheckBox Component of Java Swing... to customize the icon in a check box component. That means any icon can be shown where... box component of swing. The icon is passed to the setIcon() method
Adding a Rollover and Pressed Icon to a JButton Component in Java
Adding a Rollover and Pressed Icon to a JButton Component in Java... about adding event i.e. the rollover and click icon to a JButton component of swing in java. Rollover means moving mouse pointer above the icon on the button. 
Creating Dynamic Tree component in RCFaces
Creating Dynamic Tree component in RCFaces... that how you can create a dynamic tree component with the use of RCFaces core tag v... for this component value String holding the current value
To render imageicon to image component - Java Server Faces Questions
To render imageicon to image component  Hi, I am trying to retrieve an image from SQL Server database and render the corresponding image icon to an image component in visual web jsf component. But, I am not able to display
Create a JRadioButton Component in Java
Create a JRadioButton Component in Java   ... it once. Here, you will see the JRadioButton component creation procedure in java... button in java swing. Radio Button is like check box. Differences between check
Setting Tool Tip Text for items in a JList Component
the tool tip text for items present in the JList component of the Java Swing... in the JList component in Java Swing. In this program, you can add more and more items... which holds the list of item which are shown in the JList component of Java
Chapter 10. Message-Driven Bean Component Contract
Chapter 10. Message-Driven Bean Component...; Chapter 10. Message-Driven Bean Component ContractIdentify correct...(); Queue stockInfoQueue = (javax.jms.Queue)initialContext.lookup ("java
Introduction To Enterprise Java Bean(EJB). Developing web component.
Developing web component  ...   Introduction To Java Beans... components, web component and the enterprise bean. Web
Implement mechanisms for efficient inter-component calls
-component calls Prev Chapter 1. Design, build and test...; Implement mechanisms for efficient inter-component calls Bean Interfaces...-by-reference semantics. The local interface is a standard Java interface
Creating a JTable Component
of JTable and it's components. JTable: The JTabel component is more flexible Java... a JTable component, you need a java swing frame. The JTable based on the frame's... Creating a JTable Component     
Web component
Web component  Is HTML page a web component
sql component
sql component  is sql package is the component of jdbc
GUI component
GUI component  How can a GUI component handle its own events
Chapter 6. Component Contract for Container-Managed Persistence (CMP)
Chapter 6. Component Contract for Container-Managed...     Chapter 6. Component Contract for Container-Managed... persistence (CMP) typically consists of its entity bean class; a component
Java Slider Example,Java JSlider,Slider Component in Java Swing,JSlider Source Code Java
JSlider Component of Java Swing In this section, you will learn how to create a JSlider component of Java Swing. A Slider is the tool of swing through... on the JSlider component have also been shown. If you increase or decrease the slider
Changing the Label of a JButton Component in Java
Changing the Label of a JButton Component in Java       This section illustrates you how to change the label of a button in java swing. JButton is the component of javax.swing.
MXML component
MXML component  Hi..... Please tell me about that prob When I set visible=?false?, the component still takes up space and appears in the tab order. Why is that? Thanks  Ans: You can often achieve the "display
Component in actionscript
Component in actionscript  Hi...... Have you built any components with actionscript? If so explain how you did it? please give me the example for that....... Thanks   Ans: CityComboBox.as package components { import
CheckBox component in Echo3
CheckBox component in Echo3   ... in this Check Box example we will describe you how to create CheckBox component in Echo3... application in Echo3 we have created two java files as described below
Loading delay component in Echo3
an application which will describe how to create delay component loading. To create a delay component loading we have created two java classes DelayServlet.java... Loading delay component in Echo3   
Java Trees, Java JTree Example, Create Tree in Java, Creating a JTree Component
Creating a JTree Component     ... and its components as well as how to create an JTree component. Here, first of all we are going to describe about the JTree and its component. The java.swing 
Selecting a Radio Button component in Java
Selecting a Radio Button component in Java       In this section, you will learn how to set the radio buttons in a group so that only one can be selected at a time. This program
What is component mapping in Hibernate?
What is component mapping in Hibernate?  Hi, What is component mapping in Hibernate? thanks
web component development
web component development  sir ineed objectives type questions
web component development
web component development  sir ineed objectives type questions
business component development
business component development  sir ineed objectives type questions
Facelet component Tag
Facelet component Tag          This tag is used to add a new component into the JSF component tree as children of UI component instance. This tag shows
UI Component initialized
UI Component initialized  Hi.... What are the methods called when a UI component is intialized in flex? give me a good example... is initialized. 1. preInitialize: is dispatched when the component has been attached
component designing - Struts
component designing  i want to know the procedure to design the Dynamic header and footer jsp for global use
UI Component lifecycle
UI Component lifecycle  Hi...... Explain the UIComponent lifecycle, including important methods like initialize(), createChildren(), etc. Thanks
Flex Component Life Cycle
Flex Component Life Cycle  hi.... please tell me about What is Flex Component Life Cycle? Thanks  Ans: There are following pase of flex component life cycle. 1. Initialization phase 2. Update phase 3
Component Using ActionScript
Component Using ActionScript   Hi... Please tell me Have you built any components with actionscript? If so explain how you did it? Give example also. Thanks in advance
component based technology - EJB
component based technology  main concept behind ejb  Hi Friend, Enterprise JavaBeans (EJBs) are used in distributed applications that contains the application's business logic and live business data. EJB addresses
Setting focus to second component of modal dialog - tutorial
Setting focus to second component of modal dialog 2001-03-07 The Java Specialists' Newsletter [Issue 012] - Setting focus to second component of modal... subscribe either via email or RSS. Welcome to the 12th issue of "The Java

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.