Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java swing place objects vertically

JPanel panel = new JPanel();
panel.setLayout(new BoxLayout());

JButton button = new JButton("Button");
button.setAlignmentX(Component.CENTER_ALIGNMENT);
panel.add(button);

new JFrame.add(panel);
 
PREVIOUS NEXT
Tagged: #java #swing #place #objects #vertically
ADD COMMENT
Topic
Name
9+3 =