Class: BoxLayoutExample
- Inherits:
-
Frame
- Object
- Frame
- BoxLayoutExample
- Includes:
- SwingParadise::BaseModule
- Defined in:
- lib/swing_paradise/examples/005_box_layout_example.rb
Constant Summary
Constants included from SwingParadise
SwingParadise::LAST_UDPATE, SwingParadise::VERSION
Instance Method Summary collapse
-
#initialize ⇒ BoxLayoutExample
constructor
# === initialize ========================================================================= #.
Methods included from SwingParadise::BaseModule
#bold_text, #checkbox, #combo_box, #commandline_arguments?, #create_boxlayout, #create_grid, #default_close, #do_quit, #empty_border, #entry, #first_argument?, #hbox, #infer_the_namespace, #is_visible, #java_colour, #jbutton, #jlabel, #jpanel, #jscroll_pane, #jtextarea, #make_bold, #namespace?, #password_field, #quit_button, #reset_the_internal_hash, #return_pwd, #right_aligned_label, #set_commandline_arguments, #text, #this_file_was_not_found, #use_jruby?, #vbox, #word_wrap
Methods included from SwingParadise
#jcombobox, #jframe, #jruby_font, #jtextview, #quit_button, remove_html, #show_message_dialog, #swing_dimension, text, #text
Constructor Details
#initialize ⇒ BoxLayoutExample
#
initialize
#
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/swing_paradise/examples/005_box_layout_example.rb', line 13 def initialize super('BoxLayoutExample Example') set_size(480, 180) panel = new_boxlayout(:new_panel) # panel.set_font(Font.new('Calibri', Font::PLAIN, 42)) panel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)) # The top label _ = text('Login') _.center entry1 = text_field(10) entry1.setAlignmentX(Component::CENTER_ALIGNMENT) entry2 = password_field(10) entry2.setAlignmentX(Component::CENTER_ALIGNMENT) # The login button = ('login') .setAlignmentX(Component::CENTER_ALIGNMENT) panel.batch_add(_, entry1, entry2, ) add(panel, BorderLayout::NORTH) end |