Class: Java::JavaxSwing::JComboBox

Inherits:
Object
  • Object
show all
Defined in:
lib/swing_paradise/java_classes/jcombobox/jcombobox.rb

Overview

#

require ‘swing_paradise/jcombobox/jcombobox.rb’

#

Instance Method Summary collapse

Instance Method Details

#dimensions(hash = { x_axis: 10, y_axis: 20, width: 300, height: 50 }) ⇒ Object

#

dimensions

This is just a wrapper over setBounds() to allow us to work with a Hash instead.

#


14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/swing_paradise/java_classes/jcombobox/jcombobox.rb', line 14

def dimensions(
    hash = {
      x_axis:  10,
      y_axis:  20,
      width:  300,
      height:  50
    }
  )
  # is: x-coordinate, y-coordinate, width, height)
  setBounds(
    hash[:x_axis],
    hash[:y_axis],
    hash[:width],
    hash[:height]
  )
end