Index of Java 11 Swing training course
Section
Section Name
Page
One
Introduction to Java
2
- Usage of Java
3
- Structure of Java
4
- Flexibility of Java Programming
5
- Swing and AWT in Java
6
Two
Using Java in DOS
9
- Using the DOS window
10
- DOS Operating System Commands
11
- Compiling and Executing Java Programs in DOS
13
- Using JAVAC to Compile Java Programs
14
Three
Dialog Boxes
20
- Using Dialog Boxes
21
- Using Message Dialogs
23
- Using ImageIcons with Message Dialogs
28
- Using Confirm Dialogs
31
- Using Input Dialogs
36
- Using Input Dialogs with Icons and Lists
38
- Using Option Dialogs
40
- Making a Beep in Java
46
- Exercise One
47
Four
Dimensions
52
- The Dimension Datatype
53
- Examples of Using Dimensions
54
- Methods for Dimensions
55
- getScreenSize()
57
Five
JFrame
58
- Using JFrame
59
- setDefaultCloseOperation()
60
- setVisible()
61
- Exiting JFrames
62
- setResizable()
63
- setLocation()
64
- setBounds()
66
- Centering JFrames
67
- JFrame Example
68
- setLocationRelativeTo() for Centreing
69
- dispose()
70
- Using setIconImage()
71
- Using Constructors in Java Swing
72
- serialVersionUID
73
- Creating a Constructor Method
74
- JFrame Constructor
76
- @SuppressWarnings
77
- Exercise Two
81
Six
JComponent
83
- Introduction
84
- Methods to Change Appearance
85
- Methods to Process Components
89
Seven
Colour and Fonts
93
- Using Color
94
- Using Color with JFrame
96
- Using Font
97
Eight
JLabel
103
- Using JLabel
104
- getContentPane().add()
105
- Creating a message in JLabel
107
- Using HTML with JLabel
108
- Changing the position in a JLabel
111
- Adding an Icon to a JLabel
113
- Changing a JLabel’s Colour and Font
115
- Icon only JLabel
117
- setVerticalAlignment()
118
- pack()
120
- Exercise Three
121
Nine
Borders
124
- BorderFactory
125
- createEmptyBorder()
128
- createLineBorder()
129
- createRaisedBevelBorder()
131
- createRaisedSoftBevelBorder()
132
- createBevelBorder()
133
- createDashedBorder()
135
- createStrokeBorder()
138
- createEtchedBorder()
142
- createMatteBorder()
144
- createTitledBorder()
146
- Nested createTitledBorder()
156
- Fonts with createTitledBorder()
157
- createCompoundBorder()
158
- Exercise Four
161
Ten
Mid-Level Containers
165
- Containers
166
- JPanels
168
- JScrollPanes
170
- Scroll Bar policy
173
- Exercise Five
175
Eleven
Absolute Layouts
177
- Introduction
178
- setBounds()
179
- Exercise Six
183
Twelve
Layouts
184
- JPanel and Layouts
185
- FlowLayout
187
- Some FlowLayout Methods
191
- GridLayout
193
- Some GridLayout Methods
198
- BorderLayout
199
- Defining BorderLayouts since Java 1.4
204
- Some BorderLayout Methods
206
- Exercise Seven
207
- BoxLayout
210
- SpringLayout
213
- putConstraint()
217
Thirteen
Box
221
- Introduction
222
- createRigidArea()
224
- createVerticalStrut()
225
- createHorizontalStrut()
226
- createGlue()
227
- createHorizontalGlue() / createVerticalGlue()
229
- Using Box.Filler
230
- Using Box as a Container
233
- Exercise Eight
235
Fourteen
JButton
237
- Introduction
238
- Example
239
- Using Insets to re-size JButtons
241
- Using Icons with JButtons
243
- Using AbstractButton with JButtons
244
- Using SwingConstants with JButtons
248
- Some Methods for JButtons
249
- Using HTML with JButton
252
- Advanced Icons with JButtons
253
- Using Rollover with JButtons
255
- JButtons and ToolTips
256
- BasicArrowButton
257
Fifteen
Event Handling with Listeners
259
- Listening for Events
260
Sixteen
Private Event Listeners for JButtons
265
- Introduction
266
- java.awt.event.*
267
- Example of Private Listener
268
- ActionEvent
270
- Recording the Event
271
- Which Component fired the Listener
272
- Using getActionCommand()
273
- getValueIsAdjusting()
274
- getWhen()
275
- Exercise Nine
276
Seventeen
Public Event Listeners
278
- Introduction
279
- Example of Public Listener
280
Eighteen
Implemented Event Listeners
282
- Introduction
283
- Example of Implemented Listener
284
Nineteen
Listener Events
286
- Introduction
287
- Multiple Events with Listeners
288
- Exercise Ten
289
Twenty
JTextComponent
291
- Methods in JTextComponent
292
Twenty One
Input Components
293
- Introduction
294
- JTextField
295
- JTextField Example
296
- JTextField Initialisation
298
- Other Methods for JTextField
299
- Processing JTextField using getText()
301
- Listeners for JTextField
302
- FocusListener with JTextField
303
- ActionListener with JTextField
305
- JPasswordField
308
- JPasswordField Example
309
- setEchoChar()
311
- JTextArea
312
- JTextArea Example
313
- JTextArea and setFocusable()
315
- Wrapping text in JTextArea
317
- Listeners with JTextArea
320
- Some methods for JTextArea
321
- JFormattedTextField
324
- Initialising JFormattedTextField
325
- Populating JFormattedTextField
328
- Using setValue()
330
- Listeners with JFormattedTextField
331
- Using MaskFormatter
332
- Using setFocusLostBehavior
334
- requestFocusInWindow()
336
- Exercise Eleven
337
Twenty Two
GroupLayout
339
- Introduction
340
- Sequential and Parallel Groups
341
- addGap()
344
- setAutoCreateGaps()
345
- Changing Direction of Components
346
- Chained Invocation or Method Chaining
347
- Adding further Groups with addGroup()
348
- Controlling Resizing with addComponent()
353
- Using LinkSize to standardise sizing
356
- Alignment
357
Twenty Three
Selection Components
358
- JComboBox
359
- Using addItem() with JComboBox
362
- getSelectedItem() with JComboBox
363
- ComboBoxModel with JComboBox
364
- Some methods for JComboBox
365
- ItemListener with JComboBox
367
- JCheckBox
368
- JCheckBox Example
369
- Initialising JCheckBox
370
- Using HTML with JCheckBox
371
- Images with JCheckBox
372
- ItemListener with JCheckBox
373
- JToggleButton
375
- Initialising JToggleButton
376
- Listeners with JToggleButtons
377
- JRadioButton
378
- JRadioButton Example
380
- Initialising JRadionButtons
382
- Icons with JRadioButtons
383
- ActionListener with JRadioButton
385
- Using setActionCommand()
386
- setActionCommand() Example
387
- Using Enumeration
389
- Using AbstractButton
392
- Exercise Twelve
393
- JList
398
- JList Example
399
- setLayoutOrientation() with JList
401
- setSelectionMode() with JList
403
- setPrototypeCellValue() with JList
405
- setFixedCellWidth with JList
406
- DefaultListModel with JList
407
- DefaultListModel Example
408
- Icons with DefaultListModels
410
- Using Vectors
412
- Methods for Vectors
413
- getSelectedIndices() in JList
418
- JList Listeners
419
- ListSelectionListener
420
- Using getSelectedValuesList()
421
- ListDataListener
422
- ListDataListener Example
423
- Exercise Thirteen
425
- JSpinner
428
- SpinnerNumberModel
429
- SpinnerNumberModel Example
430
- Methods for SpinnerNumberModel
431
- Change Orientation of JSpinner
432
- ChangeListener with JSpinner
433
- SpinnerListModel
434
- SpinnerListModel Example
435
- setPreferredSize()
436
- ArrayLists with SpinnerListModel
438
- SpinnerDateModel
439
- SpinnerDateModel Example
441
- DateEditor with SpinnerDateModel
443
- JSlider
448
- Initialising JSlider
449
- ChangeListener with JSlider
451
- Placing Numbers on the JSlider
452
- Placing ticking on the JSlider
453
- setMinorTickSpacing() with JSlider
454
- Customising the JSlider ticks
455
- Some more JSlider methods
456
- JSeparator
458
- JSeparator Example
459
- Using Box with JSeparator Example
461
- Exercise Fourteen
463
Twenty Four
JMenus and JPopupMenus
466
- Introduction
467
- JMenuBar
468
- JMenuBar Example
470
- JMenu
471
- JMenu Example
472
- JMenuBar and JTextField
473
- Mnemonic with JMenus
474
- MenuListener
475
- MenuListener Example
476
- JMenuItem
478
- JMenuItem Example
479
- JMenuItems with Images
480
- Mnemonic with JMenuItems
481
- Accelerator with JMenuItems
482
- Listeners with JMenuItems
484
- JMenuItem and MenuKeyListener
485
- Sub-Menus in JMenus
486
- JCheckBoxMenuItems in JMenus
487
- JCheckBoxMenuItems with Images
489
- JCheckBoxMenuItems with ItemListener
490
- JRadioButtonMenuItem in JMenus
491
- JRadioButtonMenuItem Example
492
- JRadioButtonMenuItem with JMenu Example
493
- JRadioButtonMenuItem with Images
494
- JRadioButtonMenuItem and Listeners
495
- Using getActionCommand() with JRadioButton
496
- Using Enumeration
497
- JPopupMenu
498
- JPopupMenu with MouseListener
499
- MouseListener Examples
500
- Event.isPopupTrigger()
502
- PopupMenuListener
503
- JToolBar
504
- JToolBar Example
506
- JToolBar and setFloatable()
508
- JToolBar and Listeners
509
- JToolBar and Icons
510
- JToolBar Orientation
511
- JToolBar with JTextFields
512
- addSeparator() with JToolBar
514
- Exercise Fifteen
515
Twenty Five
Look and Feel (LAF)
518
- Using setLookandFeel()
519
- Standard LAF Styles
521
- javax.swing.plaf.metal.MetalLookAndFeel
523
- javax.swing.plaf.nimbus.NimbusLookAndFeel
524
- com.sun.java.swing.plaf.motif.MotifLookAndFeel
525
- com.sun.java.swing.plaf.windows.WindowsLookAndFeel
526
- com.sun.java.swing.plaf.windows.WindowsClassicLookandFeel
527
- Defaulting the LAF permanently in Java
528
- Using Third Party LAFs
529
- Installing the LAF in the Operating System
530
- Identifying the Look and Feel Class in the Jar file
531
- Using the third party LAF in Java
532
Twenty Six
GridBagLayouts
533
- Introduction
534
- GridBagConstraints
535
- GridBagConstraints Example
538
- gridx and gridy
543
- gridx and gridy example
544
- gridwidth and gridheight
547
- gridwidth and gridheight example
548
- GridBagConstraints.REMAINDER
551
- fill
552
- fill example
553
- anchor
554
- anchor examples
555
- insets
557
- insets example
558
- ipadx and ipady
559
- ipadx and ipady example
560
- weightx and weighty
561
- Final example
565
Twenty Seven
JTable
571
- Introduction
572
- JTable Example
573
- Default Settings
576
- setPreferredScrollableViewportSize()
577
- java.lang.ArrayIndexOutOfBoundsException
578
- Problems with the TableColumnModel
579
- Adding to a JPanel
580
- Using DefaultTableModel()
581
- Using addColumn()
582
- setAutoCreateColumnsFromModel()
584
- Changing the Width of Columns
585
- setResizable()
587
- Some Methods for JTable
588
- Moving Columns Programmatically
589
- Moving Rows Programmatically
590
- Setting the Selection Mode
591
- isCellEditable()
594
- Accessing Cells
596
- Determining the Current Cell
597
- ListSelectionListener
598
- ListSelectionListener Example
599
- TableModelListener
603
- TableModelListener Example
605
- Exercise Sixteen
608
Twenty Eight
Mouse Double Click
611
- Introduction
612
- Double Click Example
613
Twenty Nine
JTree
615
- Introduction
616
- JTree Example
617
- Populating a JTree (Top to Bottom)
619
- Expand()
622
- Populating a JTree (Bottom to Top)
623
- Populating a JTree with more levels
624
- TreeExpansionListener
626
- getLastSelectedPathComponent()
627
- TreeSelectionListener
628
- Customising the JTree
629
Thirty
CardLayouts
631
- Introduction
632
- CardLayout Example
633
- Exercise Seventeen
637
Thirty One
More Containers
642
- Introduction
643
- JSplitPane
644
- setDividerLocation() with JSplitPane
648
- Using setResizeWeight with JSplitPane
649
- JSplitPanes within JSplitPanes
650
- JTabbedPane
652
- JTabbedPane Example
654
- Using addTab() with JTabbedPane
656
- Inserting Tabs into a JTabbedPane
659
- Removing Tabs in JTabbedPane
660
- Positioning the Tabs
661
- setTabLayoutPolicy for JTabbedPane
664
- setMnemonic() with Tabs
666
- Some Methods for JTabbedPane
667
- ChangeListener with JTabbedPane
671
Thirty Two
More Frames
673
- JInternalFrame
674
- Using LAF with JInternalFrame
676
- JInternalFrame Behaviour
677
- Some JInternalFrame Methods
680
- Adding Compnents to JInternalFrame
681
- setJMenuBar() for JInternalFrame
682
- InternalFrameListener
683
- isVisible() with JInternalFrame
685
- JLayeredPane
686
- JLayeredPane Example
690
- Layouts in JLayeredPane
692
- More methods for JLayeredPane
693
- JDesktopPane
696
- showInternalMessageDialog
697
- showInternalConfirmDialog
700
- Exercise Eighteen
705
Thirty Three
JWindow
707
- Using JWindow
708
Thirty Four
Swing Timers and Progress Bars
710
- Introduction
711
- Methods for Swing Timers
714
- Timers and Coaleace
716
- JProgressBar
717
- JProgressBar Example
718
- JProgressBar Methods
720
- Displaying text in the JProgressBar
721
- JProgressBar Orientation
723
- JProgressBar and ChangeListener
724
- Using Threads to create a Splash screen
725
- Cursors
727
- Scope of Cursors
730
- Creating a Custom Cursor
731
Thirty Five
System Tray
732
- Introduction
733
- System Tray Example
735
Thirty Six
Java Built-in Choosers
738
- JColorChooser
739
- ChangeListener
745
- setPreviewPanel()
748
- Using setColor()
749
- Using AbstractColorChooserPanel
750
- JFileChooser
752
- setFileSelectionMode()
757
- setControlButtonsAreShown()
759
- FileFilter
760
- setAcceptAllFileFilterUsed()
762
- addChoosableFileFilter
763
- Some Methods for JFileChooser
764
- ActionListener with JFileChooser
765
- Exercise Nineteen
768