GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Tech FAQs  >  Programming  >  Java Swing
Go To First  |  Previous Question  |  Next Question 
 Java Swing  |  Question 63 of 72    Print  
how add scroll pane to frame? explain with example?

  
Total Answers and Comments: 2 Last Update: November 20, 2006     Asked by: suresh.bandlamudi 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
April 12, 2006 06:34:58   #1  
priyanka11 Member Since: April 2006   Contribution: 19    

RE: how add scroll pane to frame? explain with example...

JPanel p new JPanel();

int v ScrollPaneConstant.VERTICAL_SCROLLBAR_ALWAYS;

int h ScrollPaneConstant.HORIZONTAL_SCROLLBAR_ALWAYS;

JScrollPane jsp new JScrollPane(p v h);

p.add(jsp);


 
Is this answer useful? Yes | No
November 20, 2006 09:29:05   #2  
sivasundararajan        

RE: how add scroll pane to frame? explain with example...
it is ScrollPaneConstants and not ScrollPaneConstant
 
Is this answer useful? Yes | No

 Related Questions

A) PanelB) DialogC) FrameD) Window 
Latest Answer : The default layout of a Panel is FlowLayout.The default layout of Window class is BorderLayout.BorderLayout is the default layout of the subclasses of window class such as Frame and Dialog. So the answer would be B,C,D. ...

A) CanvasB) ImageC) FrameD) Graphics  
Latest Answer : Canvasimage ...

An application has a frame that uses a Border layout manager. Why is it probably not a good idea to put a vertical scroll bar at North in the frame?
A) The scroll bar’s height would be its preferred height, which is not likely to be enough.B) The scroll bar’s width would be the entire width of the frame, which would be much wider than necessary.C) 

If a frame uses a Grid layout manager and does not contain any panels, then all the components within the frame are the same width and height.
A) TrueB) False 

A) A panelB) A frameC) An appletD) A menu bar  
Latest Answer : FramePanelAppletMenubarMenu ...

What is the result of executing the following Java class: import java.awt.*; public class FrameTest extends Frame {public FrameTest() {add (new Button("First"));add (new Button("Second"));add (new Button("Third"));pack();setVisible(true);}public static void main(String args []) {new FrameTest();}} Select from the following options:
A) Only the "third" button is displayed.B) A runtime exception is generated (no layout manager specified).C) Only the "first" button is displayed.D) Only the "second" button 

You have created a simple Frame and overridden the paint method as follows public void paint(Graphics g){ g.drawString("Dolly",50,10);}What will be the result when you attempt to compile and run the program?
A) The string "Dolly" will be displayed at the centre of the frameB) An error at compilation complaining at the signature of the paint methodC) The lower part of the word Dolly will be seen at 

A text field has a variable-width font. It is constructed by calling new TextField("iiiii"). What happens if you change the contents of the text field to "wwwww"? (Bear in mind that is one of the narrowest characters, and w is one of the widest.)
A) The text field becomes wider.B) The text field becomes narrower.C) The text field stays the same width; to see the entire contents you will have to scroll by using the ß and à keys.D) The 

A) ButtonB) LabelC) CheckboxMenuItemD) ToolbarE) Frame 
Latest Answer : All are correct. ...

A) FrameB) TextAreaC) MenuBarD) FileDialogE) Applet 
Latest Answer : A,E are the sub classes of container ...


 Sponsored Links

 
Related Articles

Service Oriented Java Business Integration Review

Service Oriented Java Business Integration Review Introduction If you ve read through the texts which give you an introduction to SOA or Web Services you will often find them to be quite frustrating and the reason for this is because they spend too much time referencing business processes which are
 

Frame Relay

Frame Relay Frame Relay is a concept where the information is sent using data frames in a digital format Using this relay service the data can be sent in a fast and efficient manner through the internet Frame Relay is also a cheaper way to send data from one point to another mosgoogle The internet s
 

Concepts of Object-Oriented Programming

Object Oriented JavaScript In this chapter you ll learn about OOP Object Oriented Programming and how it relates to JavaScript As an ASP NET developer you probably have some experience working with objects and you may even be familiar with concepts such as inheritance However unless you re already a
 

Java and Client Server Models

Java and Client Server Models The Role of Client Servers on the Web Client server models provide the essential mechanisms for working with the Internet In fact most of the World Wide Web is built according to this paradigm In client server models the web browsers run by millions of users are the cli
 

Explain about TNSPING

You can also use tnsping utility on command prompt to check Oracle Net connectivity. Follow these steps to check the connection to particular SID. Open Command prompt. Write tnsping < SID for the database connectivity you want to check > If you get the message “Used TNSNAMES
 

SQL Programming

SQL Programming Overview Anybody who has done something for a long time has probably wanted to change how things work at some point or another. A worker at a mill might have found a more efficient way of cutting logs, or a mathematics teacher might have had a hand in changing a school’s al
 

WinRunner Programming Concepts

If you want to create WinRunner scripts that are highly efficient, there are important programming concepts that you will want to become familiar with. Understanding these concepts will provide you with a large number of key benefits. In addition to understanding these concepts, you must also learn
 

Programming Languages Certification

IT Certification programs have several options that will offer you the best knowledge.  By learning everything that you need to know about information technology you will be able to open new doors to your career and personal business desires.  IT Certification offers several vari
 

Using UML with Java

Using UML with Java While Java is not a new language its application for the development of embedded systems is quite new Developers are beginning to take a second look at modeling languages such as UML and many feel it can be a powerful tool in their development arsenal mosgoogle center Introductio
 

Neuro-linguistic Programming Methods

Neuro linguistic Programming Methods There are several methods used for performing Neuro linguistic Programming on an individual for obtaining insights into the psyche of the person in order to correct to modify certain patterns of behavior These techniques are also used for Neuro linguistic trainin
 

About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape