Interview Questions Answers.ORG
Interviewer And Interviewee Guide
Interviews
Quizzes
Home
Quizzes
Interviews Java Programming Language Interviews:Advanced JavaCore JavaEclipseFull Stack Developer (Java)HibernateIBM WebSphereInternationalization LocalizationJ2EEJ2MEJ2SEJavaJava ANTJava AppletJava BeansJava ClassesJava EJB ProgrammingJava Game DeveloperJava GUI FrameworkJava JNDIJava JNIJava JSP ProgrammingJava Message Service (JMS)Java Multi-ThreadingJava Networking - Sockets and RMIJava PatternsJava SecurityJava Server FacesJava Servlet ProgrammingJava Software EngineerJava Swing ProgrammingJava TechnicalJava ThreadsJava Transaction APIJava Web ServicesJavaMailJBossJDBCJMSJSFPortal and PortletRMISpring FrameworkSr.Java Web DeveloperStrutsSunOneSwing AWTSWT JFace
Copyright © 2018. All Rights Reserved
Swing AWT Interview Question:
What is the process of setting the layout manager?
Submitted by: AdministratorThe layout managers uses Jpanels and content panes to initializes the object that is to be used with the FlowLayout by default and it can be changed by defining a different layout. Content panes uses border layout by default and it uses appropriate tools that can be used to code the appropriate object that has to be used. The panel layout manger can be setup by using the Jpanel constructor and it can be shown by an example given as:
JPanel panel = new JPanel(new BorderLayout());
The setLayout method is used to set the layout manager after the container is being created.
Container contentPane = frame.getContentPane();
contentPane.setLayout(new FlowLayout());
The container's layout property can be changed to NULL to allow the absolute positioning to take place where the specification is given in the form of size and positon of each component that is used inside the container.
Submitted by: Administrator
JPanel panel = new JPanel(new BorderLayout());
The setLayout method is used to set the layout manager after the container is being created.
Container contentPane = frame.getContentPane();
contentPane.setLayout(new FlowLayout());
The container's layout property can be changed to NULL to allow the absolute positioning to take place where the specification is given in the form of size and positon of each component that is used inside the container.
Submitted by: Administrator
Copyright 2007-2025 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.
https://InterviewQuestionsAnswers.ORG.