Class: SwingParadise::TextAreaExample
- Inherits:
-
JFrame
- Object
- JFrame
- SwingParadise::TextAreaExample
show all
- Includes:
- SwingParadise
- Defined in:
- lib/swing_paradise/examples/002_text_area_example.rb
Constant Summary
LAST_UDPATE, VERSION
Instance Method Summary
collapse
#jcombobox, #jframe, #jruby_font, #jtextview, #quit_button, remove_html, #show_message_dialog, #swing_dimension, text, #text
Constructor Details
#initialize(run_already = true) ⇒ TextAreaExample
25
26
27
28
29
|
# File 'lib/swing_paradise/examples/002_text_area_example.rb', line 25
def initialize(
run_already = true
)
run if run_already
end
|
Instance Method Details
#run ⇒ Object
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
# File 'lib/swing_paradise/examples/002_text_area_example.rb', line 34
def run
frame = frame('A text area example')
panel = jpanel panel.set_font(Font.new('Calibri', Font::PLAIN, 30))
frame.getContentPane.add(panel)
panel.setLayout(nil)
panel.hint = 'A text area example'
_ = text_view
_.set_font(Font.new 'Sans serif', Font::PLAIN, 32)
_.set_bounds(10, 20, 500, 400) panel << _
frame.exit_on_close
frame.set_size(500, 400)
frame.setLocationRelativeTo(nil)
frame.show_all
end
|