Playlist
• Java Frontend
2023 05 24 08 23 01
import java.awt.FlowLayout;
import javax.swing.JFrame;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
/**
*
JScrollBar
*/
public class spane {
public static void createAndShowGUI(String[] args) {
final JFrame ff = new JFrame("Scroll pane example");
ff.setSize(600, 600);
ff.setVisible(true);
ff.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
ff.getContentPane().setLayout(new FlowLayout());
JTextArea textArea555 = new JTextArea(30, 30);
JScrollPane scTextArea = new JScrollPane(textArea555);
scTextArea.setHorizontalScrollBarPolicy(
JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
scTextArea.setVerticalScrollBarPolicy(
JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
ff.getContentPane().add(scTextArea);
}
public static void main(String[] args) {
javax.swing.SwingUtilities.invokeLater(new Runnable(){
@Override
public void run() {
createAndShowGUI(args);
}
});
}
}
On this page of the site you can watch the video online Java Swing: JScrollPane with a duration of hours minute second in good quality, which was uploaded by the user Le Hoang Long Long 24 May 2023, share the link with friends and acquaintances, this video has already been watched 41 times on youtube and it was liked by 0 viewers. Enjoy your viewing!