getRootPane().setDefaultButton(JButton)
). To define a default button with RADi, set the button's variable name to "defaultButton
".
JTree
lacks a selectionMode
property (like JList
has), RADi offers some TreeSelectionModels
you choose from the selectionModel
.
![]() |
DefaultTreeSelectionModel is the default selection model. It allows all kinds of selections. |
![]() |
TreeContiguousSelectionModel allows only contiguous selections. |
![]() |
TreeSingleSelectionModel allows only one single selection at a time. |
defaultmenus
from the RADi directory.
Action
objects. RADi creates the following actions: newAction
, openAction
, saveAction
, saveAsAction
, cutAction
, copyAction
, pasteAction
and helpAction
.
![]() |
Select 'Window | Show Test Frame' or press this
. Before the test frame opens, it is pack() 'ed and you see your layout at its preferred size. Then enlarge and reduce frame size and see what happens.
| |
![]() |
Select 'Grid | Fixed Size' (or press this
). A is drawn around the layout, you can resize it as you would do with a real frame border. Then adjust column and row weights until the layout reacts as you intend. | |
|
JSeparator
, by default, has a preferred size of (0, 2) respectively (2, 0) with horizontal/vertical orientation (values are LookAndFeel
depend). As a result, separators without selected anchors are invisible. So, for horizontal separators, set the left and right anchors, for vertical separators, set the top and bottom anchors.
Note: RADi will set the anchors for you whenever you insert a JSeparator into a layout grid and will also change this setting as you change the separator's orientation property.
|
JTextArea
without a scroll pane (as a kind of multiline label). You can specify the text either exactly as it shall be displayed, including line breaks, or you can set the lineWrap
and the wrapStyleWord
properties. If you take the second approach, the text area is laid out dependent on the width of its grid cell. You may notice, that the text area's layout doesn't change if you reduce the cell width at a later time. You can force it to do so by changing the wrapStyleWord
property's value and changing it back again.
JCheckBoxes
or JRadioButtons
by selecting the left and right anchors. The reason for this is, that the sensitive area should not be larger than the visible component bounds.