import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.text.NumberFormat; import java.util.HashMap; import java.util.Locale; import java.util.Properties; import javax.swing.BoxLayout; import javax.swing.JButton; import javax.swing.JComboBox; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JTextField; public class RunFacadePattern { public static void main(String [] arguments){ System.out.println("Example for the Facade pattern"); System.out.println(); System.out.println("This code sample uses an InternationalizatgionWizard (a Facade)"); System.out.println(" to manage communication between the rest of the application and"); System.out.println(" a series of other classes."); System.out.println(); System.out.println("The InternationalizatgionWizard maintains a colleciton of Nation"); System.out.println(" objects. When the setNation method is called, the wizard sets the"); System.out.println(" default nation, updating the Currency, PhoneNumber and localized"); System.out.println(" String resources (InternationalizedText) available."); System.out.println(); System.out.println("Calls to get Strings for the GUI, the currency symbol or the dialing"); System.out.println(" prefix are routed through the Facade, the InternationalizationWizard."); System.out.println();
if (!(new File("data.ser").exists())){ DataCreator.serialize("data.ser"); }
System.out.println("Creating the InternationalizationWizard and setting the nation to US."); System.out.println();