This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revision Both sides next revision | ||
swing:start [2015/05/02 13:10] gthanos [Flow Layout Manager] |
swing:start [2015/05/02 13:21] gthanos [FlowLayout Manager] |
||
---|---|---|---|
Line 91: | Line 91: | ||
setSize(300, 150); | setSize(300, 150); | ||
setTitle("BorderLayout Demo"); | setTitle("BorderLayout Demo"); | ||
- | setLayout(new FlowLayout()); | + | |
+ | /* Select FlowLayout.LEFT for left alignment. | ||
+ | * Select FlowLayout.RIGHT for right alignment. | ||
+ | * Select FlowLayout.CENTER for center alignment (this is the default). | ||
+ | */ | ||
+ | setLayout(new FlowLayout(FlowLayout.LEFT)); | ||
setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); | setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); | ||
| |