The essence of abstractions is preserving information that is relevant in a given context, and forgetting information that is irrelevant in that context. [1]
Action
Column
(for Swing TableModel
)
JFrame
vs. JDialog
JFrame
for the part of your program that is always visibleJDialog
’s pop up when you need them, and disappear when you don’tJPanel
is also useful
JPanel
as a container for your elements when you have more of them …BorderLayout
JOptionPane
and JPanel
JMenuBar
+ JMenu
for application menu bar and pull-down menus
JMenuBar
for the application menu barJMenu
for each pull-down menuJPopupMenu
for pup-up menus displayed on right mouse clickJMenuItem
for standard menu item (text + icon)JCheckBoxMenuItem
for menu items with a checkboxJRadioButtonMenuItem
for menu items with a radio buttonJToolbar
as a container of JButton
objectsJButton
as a standard button (text + icon)JCheckBox
for two-state buttons with a check boxJRadioButton
for two-state buttons with a radio button
JLabel
for displaying a non-editable text
JTextField
for entering a single line of textJPasswordField
for entering a passwordJTextArea
for entering multiple lines of text
JScrollPane
to work correctly for large contentJSpinner
for entering a number
JSlider
for selecting a value graphically
DatePicker
for selecting a calendar datecom.github.lgooddatepicker
JList
for a visualizing a list of simple values (single column)
JComboBox
JTable
for visualizing a list of compound values (matrix)JTree
for visualizing a hierarchical structure of simple valuesJScrollPane
to work correctly for large contentJTabbedPane
for splitting the content into tabs (label + icon)JSplitPane
for splitting exactly two componentsJScrollPane
for wrapping a component that can grow indefinitely<html>
</html>