0% found this document useful (0 votes)
11 views1 page

SS7-java-63-scrollpane

The document is a Java program that creates a JFrame with a FlowLayout containing a JButton inside a JScrollPane. The JScrollPane is set to always show both vertical and horizontal scrollbars. The main method initializes the JFrame and sets its size to 500x500 pixels before making it visible.

Uploaded by

shashank220906
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views1 page

SS7-java-63-scrollpane

The document is a Java program that creates a JFrame with a FlowLayout containing a JButton inside a JScrollPane. The JScrollPane is set to always show both vertical and horizontal scrollbars. The main method initializes the JFrame and sets its size to 500x500 pixels before making it visible.

Uploaded by

shashank220906
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Input:

import javax.swing.*;
import java.awt.*;
public class AJPPR62 extends JFrame
{
AJPPR62()
{
FlowLayout f = new FlowLayout();
setLayout(f);
JButton b1 = new JButton("This button is inside a
Scrollpane");
JScrollPane s = new
JScrollPane(b1,ScrollPaneConstants.VERTICAL_SCROLLBAR
_ALWAYS,ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWA
YS);
add(s);
}
public static void main(String args[])
{ AJPPR62 a = new AJPPR62();
a.setSize(500,500);
a.setVisible(true);
}
}
Output:

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy