swing:start

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
swing:start [2015/05/02 13:21]
gthanos [FlowLayout Manager]
swing:start [2015/05/02 13:26]
gthanos [FlowLayout Manager]
Line 90: Line 90:
     super();     super();
     setSize(300,​ 150);     setSize(300,​ 150);
-    setTitle("​BorderLayout ​Demo"​);​+    setTitle("​FlowLayout ​Demo"​);​
     ​     ​
     /* Select FlowLayout.LEFT for left alignment.     /* Select FlowLayout.LEFT for left alignment.
Line 134: Line 134:
 } }
 </​code>​ </​code>​
 +
 +Το παράθυρο που προκύπτει δίνεται παρακάτω. Δοκιμάστε να αλλάξετε την στοίχιση σε δεξιά ή κεντρική μεταβάλλοντας την γραμμή ''​setLayout(new FlowLayout(FlowLayout.LEFT));​ ''​ σε ''​setLayout(new FlowLayout(FlowLayout.RIGHT));​ ''​ ή ''​setLayout(new FlowLayout(FlowLayout.CENTER));''​
 +
 +{{ :​swing:​flowlayoutdemo.png |}}
  
 ===== Grid Layout Manager ===== ===== Grid Layout Manager =====
swing/start.txt · Last modified: 2016/02/26 11:15 (external edit)