My Account
View Cart
Home
Community
Books & Videos
Safari Books Online
Conferences
Training
School of Technology
About
Complete List
Bestsellers
New Releases
Rough Cuts
Upcoming Titles
Ebooks
By Publisher
By Series
Out of Print
Order Info
Search
Search Tips
Tell a friend
Swing Hacks
Tips and Tools for Killer GUIs
By
Joshua Marinacci
,
Chris Adamson
June 2005
Pages: 542
|
Table of Contents
|
Index
|
Sample Hacks
|
Colophon
Table of Contents
Chapter 1
Basic JComponents
Hacks 1–12: Introduction
Create Image-Themed Components
Don't Settle for Boring Text Labels
Fill Your Borders with Pretty Pictures
Display Dates in a Custom Calendar
Add a Watermark to a Text Component
Watermark Your Scroll Panes
Put a NASA Photo into the Background of a Text Area
Animate Transitions Between Tabs
Blur Disabled Components
Building a Drop-Down Menu Button
Create Menus with Drop Shadows
Add Translucence to Menus
Chapter 2
Lists and Combos
Hacks 13–20: Introduction
Filter JLists
Add a Filter History
Make JLists Checkable
Make Different List Items Look Different
Reorder a JList with Drag-and-Drop
Animate Your JList Selections
Turn Methods into List Renderers
Create a Collections-Aware JComboBox
Chapter 3
Tables and Trees
Hacks 21–27: Introduction
Size Your Columns to Suit Your JTable's Contents
Add Column Selection to JTables
Let Your JTables Do the Sorting
Create a JDBC Table Model
Export Table Data to an Excel Spreadsheet
Search Through JTables Easily
Animate JTree Drops
Chapter 4
File Choosers
Hacks 28–32: Introduction
Add a Right-Click Context Menu to the JFileChooser
Display Shortcuts in the JFileChooser
Real Windows Shortcut Support
Add Image Preview to File Choosers
Preview ZIP and JAR Files
Chapter 5
Windows, Dialogs, and Frames
Hacks 33–40: Introduction
Window Snapping
Make a Draggable Window
Add Windows Resize Icons
Add Status Bars to Windows
Save Window Settings
Earthquake Dialog
Spin Open a Detail Pane
Minimize to a Mini-Frame
Chapter 6
Transparent and Animated Windows
Hacks 41–47: Introduction
Transparent Windows
Make Your Frame Dissolve
Create Custom Tool Tips
Turn Dialogs into Frame-Anchored Sheets
Animating a Sheet Dialog
Slide Notes Out from the Taskbar
Indefinite Progress Indicator
Chapter 7
Text
Hacks 48–55: Introduction
Make Text Components Searchable
Force Text Input into Specific Formats
Auto-Completing Text Fields
Write Backward Text
Use HTML and CSS in Text Components
Use Global Anti-Aliased Fonts
Anti-Aliased Text Without Code
Anti-Aliased Text with a Custom Look and Feel
Chapter 8
Rendering
Hacks 56–64: Introduction
Create a Magnifying Glass Component
Create a Global Right-Click
Block a Window Without a Modal Dialog
Create a Color Eyedropper
Changing Fonts Throughout Your Application
Load New Fonts at Runtime
Build a Colorful Vector-Based Button
Add a Third Dimension to Swing
Turn the Spotlight on Swing
Chapter 9
Drag-and-Drop
Hacks 65–69: Introduction
Drag-and-Drop with Files
Handle Dropped URLs
Handle Dropped Images
Handling Dropped Picts on Mac OS X
Translucent Drag-and-Drop
Chapter 10
Audio
Hacks 70–78: Introduction
Play a Sound in an Applet
Play a Sound with JavaSound
Play a Sound with Java Media Framework
Play a Sound with QuickTime for Java
Add MP3 Support to JMF
Build an Audio Waveform Display
Play Non-Trivial Audio
Show Audio Information While Playing SoundHack
Provide Audio Controls During Playback
Chapter 11
Native Integration and Packaging
Hacks 79–87: Introduction
Launch External Programs on Windows
Open Files, Directories, and URLs on Mac OS X
Make Mac Applications Behave Normally
Control iTunes on Mac OS X
Control iTunes Under Windows
Construct Single-Launch Applications
Stuff Stuff in JARs
Make Quick Look and Feel Changes
Create an Inverse Black-and-White Theme
Chapter 12
Miscellany
Hacks 88–100: Introduction
Display a Busy Cursor
Fun with Keyboard Lights
Create Demonstrations with the Robot Class
Check Your Mail with Swing
Don't Block the GUI
Code Models That Don't Block
Fire Events and Stay Bug Free
Debug Your GUI
Debug Components with a Custom Glass Pane
Mirror an Application
Add Velocity for Dynamic HTML
Get Large File Icons
Make Frames Resize Dynamically
Colophon
Return to
Swing Hacks