|
| ||||||||||
| Tags: class, java, java class, java classes, java jscrollbar class, jscrollbar, jscrollbar class, jscrollbar class concept |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| |||
| |||
| How to use JScrollBar class?
I am new to the java programming. I am getting trouble while understanding the concept of 'JScrollBar class'. So need I need your help to be aware about the functionality of JScrollBar class of java. I also want be aware about the constructors and methods of JScrollBar class. If you have enough knowledge about the JScrollBar class of java, then please let me know the same. Your any help over JScrollBar class will be greatly appreciated. |
|
#2
| ||||
| ||||
| Re: How to use JScrollBar class?
A JScrollBar class used for an implementation of a scrollbar. The user positions the knob in the scrollbar to determine the contents of the viewing area. The program typically adjusts the display so that the end of the scrollbar represents the end of the displayable contents, or 100% of the contents. The start of the scrollbar is the beginning of the displayable contents, or 0%. The position of the knob within those bounds then translates to the corresponding percentage of the displayable contents. |
|
#3
| ||||
| ||||
| Re: How to use JScrollBar class?
Hi, Please following example of JScrollBar class of java: Code: import javax.swing.JScrollBar;
import java.awt.BorderLayout;
import javax.swing.JFrame;
public class JScrollBarDM {
public static void main(String argsn[]) throws Exception {
JFrame FL = new JFrame();
FL.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JScrollBar oneJScrollBar = new JScrollBar(JScrollBar.HORIZONTAL);
FL.add(oneJScrollBar, BorderLayout.NORTH);
FL.setSize(300, 44);
FL.setVisible(true);
}
} |
|
#4
| |||
| |||
| Re: How to use JScrollBar class?
Following are some most important methods of the JScrollBar class, please review them carefully:
|
|
#5
| ||||
| ||||
| Re: How to use JScrollBar class?
Hello friend, Below is the java code which is show you how to use methods of JScrollBar class: Code: import javax.swing.JScrollBar;
public class JSMainClass {
public static void main(String argsp[]) throws Exception {
AdjustmentListener adjustmentListener = new AdjustmentListener() {
public void adjustmentValueChanged(AdjustmentEvent adjustmentEvent) {
System.out.println("Adjusted: " + adjustmentEvent.getValue());
}
};
JScrollBar oneJScrollBar1 = new JScrollBar(JScrollBar.HORIZONTAL);
oneJScrollBar1.addAdjustmentListener(adjustmentListener);
JFrame GW = new JFrame("ScrollBars R Us");
GW.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
GW.add(oneJScrollBar, BorderLayout.NORTH);
GW.setSize(300, 200);
GW.setVisible(true);
}
} |
|
#6
| ||||
| ||||
| Re: How to use JScrollBar class?
Hi, I suggest you to go through following constructors of JScrollBar class:
|
|
#7
| |||
| |||
| Re: How to use JScrollBar class?
Following are some nested classes of the JScrollBar class, please review them carefully:
|
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "How to use JScrollBar 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 | 08-10-2011 11:06 PM |
| What is the difference between Local class and global class in C++? | Dėfrim | Software Development | 4 | 03-01-2011 09:44 PM |
| How to initialize a derived class with an instance of the base class in c#? | KAIRU26 | Software Development | 5 | 12-02-2010 05:23 PM |
| Ultra solid drives:Imation M-Class and S-Class | Regina | Portable Devices | 1 | 03-04-2009 10:34 AM |
| Good news for CBSE CLASS X & CLASS IX - visit learnnext | surya_expert | Education Career and Job Discussions | 0 | 13-12-2008 11:09 AM |