JScrollPanes are used in GUI development to restrict a widget to a certain size on the screen, then provide a way of scrolling up and down, left and right if the widget becomes any bigger than the 'Viewport' size.
This is used primarily in JTextArea, JTable and JList where the data displayed by the widget is changed dynamically and can really affect the size and dimensions of the widget.
C:\>jdk1.4\bin>javac JScrollPaneDemo.java
C:\>jdk1.4\bin>java JScrollPaneDemo
|
"Output of JScrollPaneDemo.class" |
|
Download Complete Program
|
Java Swing-II
It was such a great article.
ReplyDeleteJava Training with Placements