Skip to content

Java Swing Tips

Introduce the GUI program of Java Swing using small source code examples.

bunner

Add an expandable and collapsible side menu to JLayeredPane
New

Add an expandable and collapsible side menu to JLayeredPane

Drawer / Created at

Add the side menu created in JPanel to the modal layer of the JLayeredPane, and animate its expansion and collapse.

Create a weekly schedule with JTabbedPane
New

Create a weekly schedule with JTabbedPane

WeeklyScheduleCalendar / Created at

Display the dates and days of the week for one week in the tabs of JTabbedPane, and create a selectable weekly schedule calendar.

Create a dot indicator with JToggleButton
New

Create a dot indicator with JToggleButton

DotNavigationSlideshow / Created at

Create a dot indicator with JToggleButton and place it at the bottom of the page, and perform a screen transition with a scroll animation when the mouse is clicked, etc.

Popup a JPopupMenu and a JToolBar at the same time
New

Popup a JPopupMenu and a JToolBar at the same time

MultiPartPopupMenu / Created at

Change the JPopupMenu background to transparent and separate the JToolBar and menu button to display both at the same time.

Create a time selection component by combining a JFormattedTextField and increment/decrement JButtons
New

Create a time selection component by combining a JFormattedTextField and increment/decrement JButtons

TimePicker / Created at

Create a JSpinner-style time selection component by placing increment/decrement JButtons above and below a JFormattedTextField.

About the JFC and Swing (The Java™ Tutorials)

The source code is released under the MIT license.