Download presentation
Presentation is loading. Please wait.
1
Internationalization The Number Format Problem
2
Contents Problem Description Solution
3
I. Problem Description Develop a GUI program (see the next slide) to let users experiment with number formatters The combo box at the top of the GUI contains all available locales Users can choose between number, currency, and percentage formatters Users can also type a different number and click the Format button to format what they entered
5
II. Solution Developing the View
Adding Available Locales to localeComboBox Adding Listener to formatButton
6
1. Developing the View
7
2. Adding Available Locales to localeComboBox
8
The view of localeCombox is not good Use display names instead of locales
9
Sort the locales in alphabetical order of display names
11
3. Adding Listener to formatButton
12
References Core Java, Volume II – Advanced Features, Eighth Edition, Chapter 5. Cay S. Horstmann and Gary Cornell. Prentice Hall, 2008
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.