Java Reference
In-Depth Information
Class JTabbedPane offers a large number of ways to change the appearance. One
can, for example, use icons as labels for the tabs or change the background colour
of the pages. If a tabbed pane contains a large number of pages and the tabs do
not fit into a single line then they are arranged in rows. This can have the effect
that the space for displaying the selected page is very small. Since version 1.4 of
the SDK it is possible to use scrollable tabs . The tabs are then arranged in a single
row which can be scrolled left or right.
Exercises
16.1
Implement a GUI with the same layout as ListTransferFrame and the fol-
lowing functions. When an entry in the left list is selected it is moved to the
right one, i.e. removed from the left and added to the right list. When an
entry in the right list is selected it is moved to the left one.
16.2
Implement a GUI with a similar layout as ListTransferFrame and the fol-
lowing functions. Add two buttons labelled 'Move to right' and 'Move to left'
to the GUI and allow arbitrary selections in both lists. Selecting entries in one
of the lists does not trigger any action. Pressing one of the buttons causes the
appropriate selection to be moved to the other list.
Search WWH ::




Custom Search