Extreme GUI Makeover
By Adrian Sutton
The session was a lot more fluff than useful stuff and often went for showy graphics instead of actual usability which is a shame. There were some good ideas though.
- Use a modern L&F – they suggested Nimbus. Gosh it’s ugly and gray. I suggest using the system native L&F (except on Linux and Solaris then anything is an improvement)
- Add a splash screen, can do this with the -splash argument in Java 6.
- Supports alpha transparency so can be non-rectangular
- Should provide a progress bar.
- They used a sepia image fading into color to show progress which looked cool but didn’t really show progress at all effectively.
- Validating Data
- Give feedback immediately.
- JGoodies can provide a small icon in the corner of the component. You can do this yourself by painting the icon in the layered pane’s popup layer.
- Custom Components
- You can improve GUIs by creating custom components.
- This is where they messed up usability in some places. Make sure your custom components are significantly easier to use than the standard components otherwise it’s better to go with what the user is used to. Also need to consider accessibility which they didn’t mention at all.
- Improve interactivity by updating search results immediately as the user changes values.
- Use cyclic gradients for improved performance, even if you don’t need the cyclic property (just paint one iteration).
- Measure text with:
- g2.getFotnMetrics() then stringWidth and getAscent
- JList has a setLayoutOrientation method which lets you use it as a multicolumn list.
- You can span text across all the cells in a row by clipping the text with a JViewPort to show just the section inside the cell currently being painted.
- You can animate the changes made when sorting by painting the animation in the glass pane over where the table is.