| 1 | |
|---|
| 2 | package pizzaorder; |
|---|
| 3 | |
|---|
| 4 | import java.util.Locale; |
|---|
| 5 | import java.util.ResourceBundle; |
|---|
| 6 | import javax.swing.JDialog; |
|---|
| 7 | import javax.swing.JOptionPane; |
|---|
| 8 | |
|---|
| 9 | /** |
|---|
| 10 | * A Simple Swing Application to demonstrate Subversion and |
|---|
| 11 | * collaborative development. |
|---|
| 12 | * The App shows a pizza order form that can be displayed in |
|---|
| 13 | * different languages. |
|---|
| 14 | * @author jdalbey |
|---|
| 15 | */ |
|---|
| 16 | public class GUI extends javax.swing.JFrame |
|---|
| 17 | { |
|---|
| 18 | private JDialog creditsBox; |
|---|
| 19 | private String acknowledgement = ""; |
|---|
| 20 | private final String[] localeCodes = |
|---|
| 21 | { |
|---|
| 22 | "en", "sq", "ar", "bg", "ca", "zh", "hr", "cs", "da", "nl", "fi", |
|---|
| 23 | "fr", "de", "el", "iw", "hu", "is", "in", "ga", "it", "ja", "ko", "lv", |
|---|
| 24 | "lt", "ms", "mt", "no", "pl", "pt", "ro", "ru", "sk", "sl", "es", |
|---|
| 25 | "sv", "tr", "uk", "ur", "vi", "cy" |
|---|
| 26 | }; |
|---|
| 27 | |
|---|
| 28 | /** |
|---|
| 29 | * Creates new form GUI |
|---|
| 30 | */ |
|---|
| 31 | public GUI() |
|---|
| 32 | { |
|---|
| 33 | initComponents(); |
|---|
| 34 | |
|---|
| 35 | // Build the language combo box from the language codes array |
|---|
| 36 | for (int item = 0; item < localeCodes.length; item++) |
|---|
| 37 | { |
|---|
| 38 | Locale current = new Locale(localeCodes[item], ""); |
|---|
| 39 | String menuItem = localeCodes[item] + " / " |
|---|
| 40 | + current.getDisplayName(); |
|---|
| 41 | comboLocale.addItem(menuItem); |
|---|
| 42 | } |
|---|
| 43 | } |
|---|
| 44 | |
|---|
| 45 | /** |
|---|
| 46 | * This method is called from within the constructor to initialize the form. |
|---|
| 47 | * WARNING: Do NOT modify this code. The content of this method is always |
|---|
| 48 | * regenerated by the Form Editor. |
|---|
| 49 | */ |
|---|
| 50 | @SuppressWarnings("unchecked") |
|---|
| 51 | // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents |
|---|
| 52 | private void initComponents() { |
|---|
| 53 | |
|---|
| 54 | jPanel1 = new javax.swing.JPanel(); |
|---|
| 55 | jPanel2 = new javax.swing.JPanel(); |
|---|
| 56 | lblLocale = new javax.swing.JLabel(); |
|---|
| 57 | comboLocale = new javax.swing.JComboBox<>(); |
|---|
| 58 | jPanel3 = new javax.swing.JPanel(); |
|---|
| 59 | lblToppings = new javax.swing.JLabel(); |
|---|
| 60 | jCheckBox1 = new javax.swing.JCheckBox(); |
|---|
| 61 | jCheckBox2 = new javax.swing.JCheckBox(); |
|---|
| 62 | jCheckBox3 = new javax.swing.JCheckBox(); |
|---|
| 63 | jCheckBox4 = new javax.swing.JCheckBox(); |
|---|
| 64 | jCheckBox5 = new javax.swing.JCheckBox(); |
|---|
| 65 | jCheckBox6 = new javax.swing.JCheckBox(); |
|---|
| 66 | jPanel4 = new javax.swing.JPanel(); |
|---|
| 67 | btnSubmit = new javax.swing.JButton(); |
|---|
| 68 | menubar = new javax.swing.JMenuBar(); |
|---|
| 69 | mnuFile = new javax.swing.JMenu(); |
|---|
| 70 | mnuExit = new javax.swing.JMenuItem(); |
|---|
| 71 | mnuHelp = new javax.swing.JMenu(); |
|---|
| 72 | mnuCredits = new javax.swing.JMenuItem(); |
|---|
| 73 | |
|---|
| 74 | setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); |
|---|
| 75 | setTitle("Pizza Order International"); |
|---|
| 76 | |
|---|
| 77 | lblLocale.setText("Select Locale"); |
|---|
| 78 | |
|---|
| 79 | comboLocale.addActionListener(new java.awt.event.ActionListener() { |
|---|
| 80 | public void actionPerformed(java.awt.event.ActionEvent evt) { |
|---|
| 81 | comboLocaleActionPerformed(evt); |
|---|
| 82 | } |
|---|
| 83 | }); |
|---|
| 84 | |
|---|
| 85 | javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); |
|---|
| 86 | jPanel2.setLayout(jPanel2Layout); |
|---|
| 87 | jPanel2Layout.setHorizontalGroup( |
|---|
| 88 | jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) |
|---|
| 89 | .addGroup(jPanel2Layout.createSequentialGroup() |
|---|
| 90 | .addContainerGap() |
|---|
| 91 | .addComponent(lblLocale) |
|---|
| 92 | .addGap(18, 18, 18) |
|---|
| 93 | .addComponent(comboLocale, javax.swing.GroupLayout.PREFERRED_SIZE, 262, javax.swing.GroupLayout.PREFERRED_SIZE) |
|---|
| 94 | .addContainerGap(37, Short.MAX_VALUE)) |
|---|
| 95 | ); |
|---|
| 96 | jPanel2Layout.setVerticalGroup( |
|---|
| 97 | jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) |
|---|
| 98 | .addGroup(jPanel2Layout.createSequentialGroup() |
|---|
| 99 | .addContainerGap() |
|---|
| 100 | .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) |
|---|
| 101 | .addComponent(lblLocale) |
|---|
| 102 | .addComponent(comboLocale, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) |
|---|
| 103 | .addContainerGap(16, Short.MAX_VALUE)) |
|---|
| 104 | ); |
|---|
| 105 | |
|---|
| 106 | jPanel3.setBackground(new java.awt.Color(-3355393,true)); |
|---|
| 107 | |
|---|
| 108 | lblToppings.setText("Desired toppings"); |
|---|
| 109 | |
|---|
| 110 | jCheckBox1.setText("Onions"); |
|---|
| 111 | |
|---|
| 112 | jCheckBox2.setText("Mushrooms"); |
|---|
| 113 | |
|---|
| 114 | jCheckBox3.setText("Peppers"); |
|---|
| 115 | |
|---|
| 116 | jCheckBox4.setText("Olives"); |
|---|
| 117 | |
|---|
| 118 | jCheckBox5.setText("Tomatoes"); |
|---|
| 119 | |
|---|
| 120 | jCheckBox6.setText("Pepperoni"); |
|---|
| 121 | |
|---|
| 122 | javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3); |
|---|
| 123 | jPanel3.setLayout(jPanel3Layout); |
|---|
| 124 | jPanel3Layout.setHorizontalGroup( |
|---|
| 125 | jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) |
|---|
| 126 | .addGroup(jPanel3Layout.createSequentialGroup() |
|---|
| 127 | .addContainerGap() |
|---|
| 128 | .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) |
|---|
| 129 | .addGroup(jPanel3Layout.createSequentialGroup() |
|---|
| 130 | .addComponent(lblToppings) |
|---|
| 131 | .addContainerGap(303, Short.MAX_VALUE)) |
|---|
| 132 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup() |
|---|
| 133 | .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) |
|---|
| 134 | .addComponent(jCheckBox2) |
|---|
| 135 | .addComponent(jCheckBox1) |
|---|
| 136 | .addComponent(jCheckBox3)) |
|---|
| 137 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 143, Short.MAX_VALUE) |
|---|
| 138 | .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) |
|---|
| 139 | .addComponent(jCheckBox6, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) |
|---|
| 140 | .addComponent(jCheckBox4, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) |
|---|
| 141 | .addComponent(jCheckBox5, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) |
|---|
| 142 | .addGap(70, 70, 70)))) |
|---|
| 143 | ); |
|---|
| 144 | jPanel3Layout.setVerticalGroup( |
|---|
| 145 | jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) |
|---|
| 146 | .addGroup(jPanel3Layout.createSequentialGroup() |
|---|
| 147 | .addComponent(lblToppings) |
|---|
| 148 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) |
|---|
| 149 | .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) |
|---|
| 150 | .addComponent(jCheckBox1) |
|---|
| 151 | .addComponent(jCheckBox4)) |
|---|
| 152 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) |
|---|
| 153 | .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) |
|---|
| 154 | .addComponent(jCheckBox2) |
|---|
| 155 | .addComponent(jCheckBox5)) |
|---|
| 156 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) |
|---|
| 157 | .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) |
|---|
| 158 | .addComponent(jCheckBox3) |
|---|
| 159 | .addComponent(jCheckBox6)) |
|---|
| 160 | .addGap(0, 42, Short.MAX_VALUE)) |
|---|
| 161 | ); |
|---|
| 162 | |
|---|
| 163 | btnSubmit.setText("Submit Order"); |
|---|
| 164 | btnSubmit.addActionListener(new java.awt.event.ActionListener() { |
|---|
| 165 | public void actionPerformed(java.awt.event.ActionEvent evt) { |
|---|
| 166 | btnSubmitActionPerformed(evt); |
|---|
| 167 | } |
|---|
| 168 | }); |
|---|
| 169 | |
|---|
| 170 | javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4); |
|---|
| 171 | jPanel4.setLayout(jPanel4Layout); |
|---|
| 172 | jPanel4Layout.setHorizontalGroup( |
|---|
| 173 | jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) |
|---|
| 174 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup() |
|---|
| 175 | .addContainerGap(280, Short.MAX_VALUE) |
|---|
| 176 | .addComponent(btnSubmit) |
|---|
| 177 | .addGap(22, 22, 22)) |
|---|
| 178 | ); |
|---|
| 179 | jPanel4Layout.setVerticalGroup( |
|---|
| 180 | jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) |
|---|
| 181 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup() |
|---|
| 182 | .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) |
|---|
| 183 | .addComponent(btnSubmit) |
|---|
| 184 | .addContainerGap()) |
|---|
| 185 | ); |
|---|
| 186 | |
|---|
| 187 | javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); |
|---|
| 188 | jPanel1.setLayout(jPanel1Layout); |
|---|
| 189 | jPanel1Layout.setHorizontalGroup( |
|---|
| 190 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) |
|---|
| 191 | .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) |
|---|
| 192 | .addGroup(jPanel1Layout.createSequentialGroup() |
|---|
| 193 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) |
|---|
| 194 | .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) |
|---|
| 195 | .addGroup(jPanel1Layout.createSequentialGroup() |
|---|
| 196 | .addContainerGap() |
|---|
| 197 | .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) |
|---|
| 198 | .addContainerGap()) |
|---|
| 199 | ); |
|---|
| 200 | jPanel1Layout.setVerticalGroup( |
|---|
| 201 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) |
|---|
| 202 | .addGroup(jPanel1Layout.createSequentialGroup() |
|---|
| 203 | .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) |
|---|
| 204 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) |
|---|
| 205 | .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) |
|---|
| 206 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) |
|---|
| 207 | .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) |
|---|
| 208 | .addGap(0, 21, Short.MAX_VALUE)) |
|---|
| 209 | ); |
|---|
| 210 | |
|---|
| 211 | mnuFile.setText("File"); |
|---|
| 212 | |
|---|
| 213 | mnuExit.setText("Exit"); |
|---|
| 214 | mnuExit.addActionListener(new java.awt.event.ActionListener() { |
|---|
| 215 | public void actionPerformed(java.awt.event.ActionEvent evt) { |
|---|
| 216 | mnuExitActionPerformed(evt); |
|---|
| 217 | } |
|---|
| 218 | }); |
|---|
| 219 | mnuFile.add(mnuExit); |
|---|
| 220 | |
|---|
| 221 | menubar.add(mnuFile); |
|---|
| 222 | |
|---|
| 223 | mnuHelp.setText("Help"); |
|---|
| 224 | |
|---|
| 225 | mnuCredits.setText("Credits"); |
|---|
| 226 | mnuCredits.addActionListener(new java.awt.event.ActionListener() { |
|---|
| 227 | public void actionPerformed(java.awt.event.ActionEvent evt) { |
|---|
| 228 | mnuCreditsActionPerformed(evt); |
|---|
| 229 | } |
|---|
| 230 | }); |
|---|
| 231 | mnuHelp.add(mnuCredits); |
|---|
| 232 | |
|---|
| 233 | menubar.add(mnuHelp); |
|---|
| 234 | |
|---|
| 235 | setJMenuBar(menubar); |
|---|
| 236 | |
|---|
| 237 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); |
|---|
| 238 | getContentPane().setLayout(layout); |
|---|
| 239 | layout.setHorizontalGroup( |
|---|
| 240 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) |
|---|
| 241 | .addGroup(layout.createSequentialGroup() |
|---|
| 242 | .addContainerGap() |
|---|
| 243 | .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) |
|---|
| 244 | .addContainerGap()) |
|---|
| 245 | ); |
|---|
| 246 | layout.setVerticalGroup( |
|---|
| 247 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) |
|---|
| 248 | .addGroup(layout.createSequentialGroup() |
|---|
| 249 | .addContainerGap() |
|---|
| 250 | .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) |
|---|
| 251 | .addContainerGap()) |
|---|
| 252 | ); |
|---|
| 253 | |
|---|
| 254 | pack(); |
|---|
| 255 | }// </editor-fold>//GEN-END:initComponents |
|---|
| 256 | |
|---|
| 257 | private void comboLocaleActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_comboLocaleActionPerformed |
|---|
| 258 | {//GEN-HEADEREND:event_comboLocaleActionPerformed |
|---|
| 259 | // When a locale is selected, load the properties file for that locale |
|---|
| 260 | // and change the labels in the GUI using the properties values. |
|---|
| 261 | Locale currentLocale = new Locale(((String)comboLocale.getSelectedItem()).substring(0,2),""); |
|---|
| 262 | //System.out.println("locale " + currentLocale.getDisplayName()); |
|---|
| 263 | ResourceBundle labels = |
|---|
| 264 | ResourceBundle.getBundle("resources.Labels", currentLocale); |
|---|
| 265 | lblToppings.setText(labels.getString("label1")); |
|---|
| 266 | jCheckBox1.setText(labels.getString("choice1")); |
|---|
| 267 | jCheckBox2.setText(labels.getString("choice2")); |
|---|
| 268 | jCheckBox3.setText(labels.getString("choice3")); |
|---|
| 269 | jCheckBox4.setText(labels.getString("choice4")); |
|---|
| 270 | jCheckBox5.setText(labels.getString("choice5")); |
|---|
| 271 | jCheckBox6.setText(labels.getString("choice6")); |
|---|
| 272 | btnSubmit.setText(labels.getString("button1")); |
|---|
| 273 | acknowledgement = labels.getString("message1"); |
|---|
| 274 | |
|---|
| 275 | }//GEN-LAST:event_comboLocaleActionPerformed |
|---|
| 276 | |
|---|
| 277 | private void btnSubmitActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnSubmitActionPerformed |
|---|
| 278 | {//GEN-HEADEREND:event_btnSubmitActionPerformed |
|---|
| 279 | String toppings = new String(); |
|---|
| 280 | if (jCheckBox1.isSelected()) toppings += ' '+ jCheckBox1.getText(); |
|---|
| 281 | if (jCheckBox2.isSelected()) toppings += ' '+ jCheckBox2.getText(); |
|---|
| 282 | if (jCheckBox3.isSelected()) toppings += ' '+ jCheckBox3.getText(); |
|---|
| 283 | if (jCheckBox4.isSelected()) toppings += ' '+ jCheckBox4.getText(); |
|---|
| 284 | if (jCheckBox5.isSelected()) toppings += ' '+ jCheckBox5.getText(); |
|---|
| 285 | if (jCheckBox6.isSelected()) toppings += ' '+ jCheckBox6.getText(); |
|---|
| 286 | javax.swing.JOptionPane.showMessageDialog(this, |
|---|
| 287 | acknowledgement + " \n" + toppings,"Order Confirmation", JOptionPane.INFORMATION_MESSAGE); |
|---|
| 288 | }//GEN-LAST:event_btnSubmitActionPerformed |
|---|
| 289 | |
|---|
| 290 | private void mnuCreditsActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_mnuCreditsActionPerformed |
|---|
| 291 | {//GEN-HEADEREND:event_mnuCreditsActionPerformed |
|---|
| 292 | if (creditsBox == null) |
|---|
| 293 | { |
|---|
| 294 | creditsBox = new CreditsBox(this, true); |
|---|
| 295 | } |
|---|
| 296 | creditsBox.setVisible(true); |
|---|
| 297 | }//GEN-LAST:event_mnuCreditsActionPerformed |
|---|
| 298 | |
|---|
| 299 | private void mnuExitActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_mnuExitActionPerformed |
|---|
| 300 | {//GEN-HEADEREND:event_mnuExitActionPerformed |
|---|
| 301 | this.dispose(); |
|---|
| 302 | }//GEN-LAST:event_mnuExitActionPerformed |
|---|
| 303 | |
|---|
| 304 | /** |
|---|
| 305 | * @param args the command line arguments |
|---|
| 306 | */ |
|---|
| 307 | public static void main(String args[]) |
|---|
| 308 | { |
|---|
| 309 | /* Set the Nimbus look and feel */ |
|---|
| 310 | //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> |
|---|
| 311 | /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. |
|---|
| 312 | * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html |
|---|
| 313 | */ |
|---|
| 314 | try |
|---|
| 315 | { |
|---|
| 316 | for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager. |
|---|
| 317 | getInstalledLookAndFeels()) |
|---|
| 318 | { |
|---|
| 319 | if ("Nimbus".equals(info.getName())) |
|---|
| 320 | { |
|---|
| 321 | javax.swing.UIManager.setLookAndFeel(info.getClassName()); |
|---|
| 322 | break; |
|---|
| 323 | } |
|---|
| 324 | } |
|---|
| 325 | } |
|---|
| 326 | catch (ClassNotFoundException ex) |
|---|
| 327 | { |
|---|
| 328 | java.util.logging.Logger.getLogger(GUI.class.getName()).log( |
|---|
| 329 | java.util.logging.Level.SEVERE, null, ex); |
|---|
| 330 | } |
|---|
| 331 | catch (InstantiationException ex) |
|---|
| 332 | { |
|---|
| 333 | java.util.logging.Logger.getLogger(GUI.class.getName()).log( |
|---|
| 334 | java.util.logging.Level.SEVERE, null, ex); |
|---|
| 335 | } |
|---|
| 336 | catch (IllegalAccessException ex) |
|---|
| 337 | { |
|---|
| 338 | java.util.logging.Logger.getLogger(GUI.class.getName()).log( |
|---|
| 339 | java.util.logging.Level.SEVERE, null, ex); |
|---|
| 340 | } |
|---|
| 341 | catch (javax.swing.UnsupportedLookAndFeelException ex) |
|---|
| 342 | { |
|---|
| 343 | java.util.logging.Logger.getLogger(GUI.class.getName()).log( |
|---|
| 344 | java.util.logging.Level.SEVERE, null, ex); |
|---|
| 345 | } |
|---|
| 346 | //</editor-fold> |
|---|
| 347 | |
|---|
| 348 | /* Create and display the form */ |
|---|
| 349 | java.awt.EventQueue.invokeLater(new Runnable() |
|---|
| 350 | { |
|---|
| 351 | public void run() |
|---|
| 352 | { |
|---|
| 353 | new GUI().setVisible(true); |
|---|
| 354 | } |
|---|
| 355 | }); |
|---|
| 356 | } |
|---|
| 357 | // Variables declaration - do not modify//GEN-BEGIN:variables |
|---|
| 358 | private javax.swing.JButton btnSubmit; |
|---|
| 359 | private javax.swing.JComboBox<String> comboLocale; |
|---|
| 360 | private javax.swing.JCheckBox jCheckBox1; |
|---|
| 361 | private javax.swing.JCheckBox jCheckBox2; |
|---|
| 362 | private javax.swing.JCheckBox jCheckBox3; |
|---|
| 363 | private javax.swing.JCheckBox jCheckBox4; |
|---|
| 364 | private javax.swing.JCheckBox jCheckBox5; |
|---|
| 365 | private javax.swing.JCheckBox jCheckBox6; |
|---|
| 366 | private javax.swing.JPanel jPanel1; |
|---|
| 367 | private javax.swing.JPanel jPanel2; |
|---|
| 368 | private javax.swing.JPanel jPanel3; |
|---|
| 369 | private javax.swing.JPanel jPanel4; |
|---|
| 370 | private javax.swing.JLabel lblLocale; |
|---|
| 371 | private javax.swing.JLabel lblToppings; |
|---|
| 372 | private javax.swing.JMenuBar menubar; |
|---|
| 373 | private javax.swing.JMenuItem mnuCredits; |
|---|
| 374 | private javax.swing.JMenuItem mnuExit; |
|---|
| 375 | private javax.swing.JMenu mnuFile; |
|---|
| 376 | private javax.swing.JMenu mnuHelp; |
|---|
| 377 | // End of variables declaration//GEN-END:variables |
|---|
| 378 | } |
|---|