Java JSeparator(int orientation) Constructor
Syntax
JSeparator(int orientation) constructor from JSeparator has the following syntax.
public JSeparator(int orientation)
Example
In the following code shows how to use JSeparator.JSeparator(int orientation) constructor.
import javax.swing.JFrame;
import javax.swing.JSeparator;
//from w w w. j a va 2 s .c o m
public class Main {
public static void main(String[] a){
JFrame frame = new JFrame();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.add(new JSeparator(JSeparator.VERTICAL));
frame.setSize(300, 200);
frame.setVisible(true);
}
}
Home »
Java Tutorial »
javax.swing »
Java Tutorial »
javax.swing »