|
| |||||||||
| Tags: class, classes, java, java class, scrollpane, scrollpane class |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| |||
| |||
| 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. |
|
#2
| ||||
| ||||
| 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. |
|
#3
| ||||
| ||||
| Re: How to use ScrollPane class?
Hello friend, I suggest you to study following methods of the ScrollPane class:
|
|
#4
| ||||
| ||||
| 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);
}
} |
|
#5
| |||
| |||
| Re: How to use ScrollPane class?
Hi friend, Below I have given four nested classes of the ScrollPane class:
|
![]() |
|
| Thread Tools | Search this Thread |
| |
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 |