swing:jscrollpane
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
swing:jscrollpane [2018/03/27 20:45] – [Παράδειγμα 2ο] gthanos | swing:jscrollpane [Unknown date] (current) – external edit (Unknown date) 127.0.0.1 | ||
---|---|---|---|
Line 36: | Line 36: | ||
</ | </ | ||
- | ===== Παραδείγματα ===== | + | ===== Παράδειγμα 1ο ===== |
- | + | ||
- | ==== Παράδειγμα 1ο ==== | + | |
Ένα παράδειγμα χρήστης των παραπάνω components δίνεται παρακάτω: | Ένα παράδειγμα χρήστης των παραπάνω components δίνεται παρακάτω: | ||
Line 138: | Line 136: | ||
| | ||
textArea = new JTextArea(10, | textArea = new JTextArea(10, | ||
- | | + | textArea.setText("" |
textArea.setFont(new Font(" | textArea.setFont(new Font(" | ||
textArea.setForeground(new Color(250, 30, 30)); | textArea.setForeground(new Color(250, 30, 30)); | ||
- | framePanel.add(textArea); | + | |
+ | textAreaScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); | ||
+ | textAreaScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED); | ||
+ | | ||
| | ||
frame.pack(); | frame.pack(); | ||
Line 161: | Line 162: | ||
</ | </ | ||
- | ==== Παράδειγμα 2ο ==== | + | ===== Παράδειγμα 2ο ===== |
Το 2ο παράδειγμα είναι από το βιβλίο του Savitch. | Το 2ο παράδειγμα είναι από το βιβλίο του Savitch. |
swing/jscrollpane.1522183539.txt.gz · Last modified: 2018/03/27 19:45 (external edit)