Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read SiteMap

Tags: , , , , ,

Sponsored Links



How to use ScrollPane class?

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 11-03-2010
Member
 
Join Date: Jan 2010
Posts: 99
How to use ScrollPane class?

Hi Friend,

I just started to learn the class concepts of the advanced java programming. While this I am not getting the use of ScrollPane class of java. I don't know anything about methods and constructors of the ScrollPane class. If you has good knowledge about this ScrollPane class of java, then please let know that. You any help over this java class would be greatly appreciated.
Reply With Quote
  #2  
Old 11-03-2010
MindSpace's Avatar
Member
 
Join Date: Feb 2008
Posts: 1,832
Re: How to use ScrollPane class?

The ScrollPane class is a container class which implements automatic horizontal and/or vertical scrolling for a single child component. The state of the horizontal and vertical scrollbars is represented by two ScrollPaneAdjustable objects (one for each dimension) which implement the Adjustable interface. The API provides methods to access those objects such that the attributes on the Adjustable object (such as unitIncrement, value, etc.) can be manipulated.
Reply With Quote
  #3  
Old 11-03-2010
Modifier's Avatar
Member
 
Join Date: Jan 2008
Posts: 1,502
Re: How to use ScrollPane class?

Hello friend,

I suggest you to study following methods of the ScrollPane class:
  • setWheelScrollingEnabled(boolean bln)
  • setScrollPosition(Point pnt)
  • setScrollPosition(int ac, int ad)
  • printComponents(Graphics gp)
  • eventTypeEnabled(int tp)
Reply With Quote
  #4  
Old 11-03-2010
Praetor's Avatar
Member
 
Join Date: Apr 2008
Posts: 1,937
Re: How to use ScrollPane class?

Example of ScrollPane class:
Code:
import javax.swing.Icon;
import javax.swing.ImageIcon;
import java.awt.ScrollPane;

public class ScrollSampleDM
 {
  public static void main(String affrgs[])
{
    String t002 = (affrgs.length == 0 ? "JScrollPane Sample" : arffgs[0]);
    JFrame frameW = new JFrame(title);
    frameW.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

    Icon iconW = new ImageIcon("dog.jpg");
    JLabel dogLabel1 = new JLabel(iconW);
    JScrollPane scrollPane1 = new JScrollPane();
    scrollPane.setViewportView(dogLabel1);
    frameW.getContentPane().add(scrollPane1, BorderLayout.CENTER);
    frameW.setSize(400, 200);
    frameW.setVisible(true);
  }
}
Reply With Quote
  #5  
Old 11-03-2010
Member
 
Join Date: May 2008
Posts: 1,990
Re: How to use ScrollPane class?

Hi friend,

Below I have given four nested classes of the ScrollPane class:
  1. ScrollPane.AccessibleAWTScrollPane
  2. Component.AccessibleAWTComponent
  3. Component.FlipBufferStrategy
  4. Container.AccessibleAWTContainer
Reply With Quote
Reply

  TechArena Community > Software > Software Development


Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "How to use ScrollPane class?"
Thread Thread Starter Forum Replies Last Post
Upgrade Sony Ericsson Xperia Play Micro SD card from class 2 8GB to class 4 32GB Aaryan2011 Portable Devices 8 09-10-2011 12:06 AM
How to initialize a derived class with an instance of the base class in c#? KAIRU26 Software Development 5 12-02-2010 06:23 PM
Concept of Scrollpane Container in Java Adrina_g Software Development 3 10-12-2009 09:23 AM
Ultra solid drives:Imation M-Class and S-Class Regina Portable Devices 1 03-04-2009 11:34 AM
Good news for CBSE CLASS X & CLASS IX - visit learnnext surya_expert Education Career and Job Discussions 0 13-12-2008 12:09 PM


All times are GMT +5.5. The time now is 05:24 AM.