Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


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


What is the preferred size of a component?

Advertisement
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 Tutorials/Questions & Answers:
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
Advertisements
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
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
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
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
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
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. 
Introduction To Enterprise Java Bean(EJB). Developing web component.
Developing web component  ...   Introduction To Java Beans... components, web component and the enterprise bean. Web
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
sql component
sql component  is sql package is the component of jdbc
Web component
Web component  Is HTML page a web component
GUI component
GUI component  How can a GUI component handle its own events
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
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
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
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
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.
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
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
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
 

 

 

DMCA.com