A travel agency has advertised a massive price drop for all summer holiday destinations. To avail of the offer, customers have to dial in and place a reservation over the phone. The agency’s telephone system is managed by a single sales agent. When the sales agent is busy talking to a customer, other potential customers are dialling in. In order not to lose these customers a robot asks the customers to give a few personal details and to hold the line. Each customer has to give their name and the budget in Euro per person they are willing to spend. The system is built so that customers willing to spend more are served first. When the number of waiting customers is higher than 5, the sales agent is informed to speed up the discussion as some of the waiting customers may become impatient and drop the call.
A GUI implementation of such application should allow to:
- input the details of a new waiting customer and alert the agent when the number of waiting customers is higher than 5;
- printout the number of waiting customers and each waiting customer’s details;
- accept the call of the next waiting customer (i.e. the one allocating the highest travel budget), and printout his/her name.
It is necessary to:
- Identify the Data Structure to be used as a solution to store the waiting customers.
- Design and develop a suitable GUI for the application
- Implement a Java application that solves the problem, making use of the identified data structure. Test the application to make sure it works correctly.
TravelAgencyTester
1 2 3 4 5 6 7 8 9 10 11 12 13 |
package travelagency; public class TravelAgencyTester { public static void main(String[] args) { // TODO code application logic here TraveAgencyGUI myTravelAgency = new TraveAgencyGUI(); myTravelAgency.setVisible(true); } } |
MyPriorityQueue
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
package travelagency; import java.util.*; public class MyPriorityQueue implements PQInterface { private ArrayList<PQElement> thePQueue; public MyPriorityQueue() { thePQueue = new ArrayList<PQElement>(); } public boolean isEmpty() { return thePQueue.isEmpty(); } public int size(){ return thePQueue.size(); } private int findInsertPosition(int newkey) { boolean found; PQElement elem; int position; found = false; position =0; while (position<thePQueue.size() && !found) { elem = thePQueue.get(position); if(elem.getKey()>newkey) position = position +1; else { found = true; } } return position; } // new element with a given key and element information will be added public void enqueue(int priorkey, Object item) { int index; PQElement elem = new PQElement(priorkey,item); index = findInsertPosition(priorkey); if (index > size()) thePQueue.add(elem); else thePQueue.add(index, elem); } //the first element has the highest priority public Object dequeue() { return ((thePQueue.remove(0)).getElement()); } public void printPQueue() { PQElement elem; for (int i = 0; i<thePQueue.size();i++) { elem = thePQueue.get(i); System.out.println("Key ="+elem.getKey()+" Element="+elem.getElement()); } } public String getPQueueToString () { PQElement elem; String formattedPQueueElements = new String(""); for (int i = 0; i<thePQueue.size();i++) { elem = thePQueue.get(i); formattedPQueueElements = formattedPQueueElements.concat("Budget ="+elem.getKey()+" Name= "+elem.getElement() + "\n"); } return formattedPQueueElements; } } |
PQInterface
1 2 3 4 5 6 7 8 9 10 |
package travelagency; public interface PQInterface { public void enqueue(int key, Object element); public int size(); public boolean isEmpty(); public Object dequeue(); public void printPQueue(); public String getPQueueToString (); } |
PQElement
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
package travelagency; public class PQElement { private int key; private Object element; public PQElement(int priority, Object e){ key = priority; element = e; } public int getKey() { return key; } public void setKey(int val) { key = val; } public Object getElement() { return element; } public void setElement(Object e) { element = e; } public String toString() { return element.toString(); } } //end of class PQElement |
TraveAgencyGUI
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 |
package travelagency; public class TraveAgencyGUI extends javax.swing.JFrame { /** * Creates new form TraveAgencyGUI */ MyPriorityQueue myTraveAgencyPQueue; public TraveAgencyGUI() { myTraveAgencyPQueue = new MyPriorityQueue(); initComponents(); } /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanel1 = new javax.swing.JPanel(); jLabel2 = new javax.swing.JLabel(); name_jTextField = new javax.swing.JTextField(); jLabel4 = new javax.swing.JLabel(); budget_jTextField = new javax.swing.JTextField(); addCustomer_jButton = new javax.swing.JButton(); jLabel1 = new javax.swing.JLabel(); jPanel2 = new javax.swing.JPanel(); jScrollPane1 = new javax.swing.JScrollPane(); log_jTextArea = new javax.swing.JTextArea(); printout_jButton = new javax.swing.JButton(); next_jButton = new javax.swing.JButton(); exit_jButton = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); jPanel1.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED)); jLabel2.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N jLabel2.setText("Customer name:"); name_jTextField.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { name_jTextFieldActionPerformed(evt); } }); jLabel4.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N jLabel4.setText("Budget (Euro/person):"); budget_jTextField.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { budget_jTextFieldActionPerformed(evt); } }); addCustomer_jButton.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N addCustomer_jButton.setText("Add customer to waiting line"); addCustomer_jButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { addCustomer_jButtonActionPerformed(evt); } }); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel4, javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jLabel2, javax.swing.GroupLayout.Alignment.TRAILING)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(budget_jTextField) .addComponent(addCustomer_jButton, javax.swing.GroupLayout.DEFAULT_SIZE, 424, Short.MAX_VALUE)) .addComponent(name_jTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 424, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap()) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(17, 17, 17) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel2) .addComponent(name_jTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(9, 9, 9) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel4) .addComponent(budget_jTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(addCustomer_jButton) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jLabel1.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N jLabel1.setText("Travel Agency - Telephone line management system"); jPanel2.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED)); log_jTextArea.setColumns(20); log_jTextArea.setRows(5); jScrollPane1.setViewportView(log_jTextArea); printout_jButton.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N printout_jButton.setText("Printout waiting line info"); printout_jButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { printout_jButtonActionPerformed(evt); } }); next_jButton.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N next_jButton.setText("Take next call"); next_jButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { next_jButtonActionPerformed(evt); } }); exit_jButton.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N exit_jButton.setText("EXIT"); exit_jButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { exit_jButtonActionPerformed(evt); } }); javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane1) .addGroup(jPanel2Layout.createSequentialGroup() .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(printout_jButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(next_jButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(exit_jButton, javax.swing.GroupLayout.PREFERRED_SIZE, 177, javax.swing.GroupLayout.PREFERRED_SIZE))) .addContainerGap()) ); jPanel2Layout.setVerticalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addContainerGap() .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 189, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(jPanel2Layout.createSequentialGroup() .addComponent(printout_jButton, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(next_jButton, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(exit_jButton, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap()) ); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel1) .addGap(44, 44, 44)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(21, 21, 21) .addComponent(jLabel1) .addGap(29, 29, 29) .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap()) ); pack(); }// </editor-fold>//GEN-END:initComponents private void name_jTextFieldActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_name_jTextFieldActionPerformed // TODO add your handling code here: }//GEN-LAST:event_name_jTextFieldActionPerformed private void budget_jTextFieldActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_budget_jTextFieldActionPerformed // TODO add your handling code here: }//GEN-LAST:event_budget_jTextFieldActionPerformed private void exit_jButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_exit_jButtonActionPerformed // TODO add your handling code here: System.exit(0); }//GEN-LAST:event_exit_jButtonActionPerformed private void addCustomer_jButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addCustomer_jButtonActionPerformed // TODO add your handling code here: String name = name_jTextField.getText(); Integer budget = new Integer (budget_jTextField.getText()); myTraveAgencyPQueue.enqueue(budget, name); name_jTextField.setText(""); budget_jTextField.setText(""); log_jTextArea.append(name + " spending " + budget + " Euro, was added to the waiting line.\n"); if (myTraveAgencyPQueue.size() >= 5) { log_jTextArea.append("Warning! 5 or more customers are waiting!\n"); } }//GEN-LAST:event_addCustomer_jButtonActionPerformed private void next_jButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_next_jButtonActionPerformed // TODO add your handling code here: if(!myTraveAgencyPQueue.isEmpty()) { String name = (String)myTraveAgencyPQueue.dequeue(); log_jTextArea.append(name + " is booking now.\n"); } else { log_jTextArea.append("No more customers in waiting line. Take a break!\n"); } }//GEN-LAST:event_next_jButtonActionPerformed private void printout_jButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_printout_jButtonActionPerformed // TODO add your handling code here: log_jTextArea.append("Wating line has: " + myTraveAgencyPQueue.size() + " customers.\n"); log_jTextArea.append(myTraveAgencyPQueue.getPQueueToString()); }//GEN-LAST:event_printout_jButtonActionPerformed /** * @param args the command line arguments */ // public static void main(String args[]) { // /* Set the Nimbus look and feel */ // //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> // /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. // * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html // */ // try { // for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { // if ("Nimbus".equals(info.getName())) { // javax.swing.UIManager.setLookAndFeel(info.getClassName()); // break; // } // } // } catch (ClassNotFoundException ex) { // java.util.logging.Logger.getLogger(TraveAgencyGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); // } catch (InstantiationException ex) { // java.util.logging.Logger.getLogger(TraveAgencyGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); // } catch (IllegalAccessException ex) { // java.util.logging.Logger.getLogger(TraveAgencyGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); // } catch (javax.swing.UnsupportedLookAndFeelException ex) { // java.util.logging.Logger.getLogger(TraveAgencyGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); // } // //</editor-fold> // // /* Create and display the form */ // java.awt.EventQueue.invokeLater(new Runnable() { // public void run() { // new TraveAgencyGUI().setVisible(true); // } // }); // } // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton addCustomer_jButton; private javax.swing.JTextField budget_jTextField; private javax.swing.JButton exit_jButton; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel4; private javax.swing.JPanel jPanel1; private javax.swing.JPanel jPanel2; private javax.swing.JScrollPane jScrollPane1; private javax.swing.JTextArea log_jTextArea; private javax.swing.JTextField name_jTextField; private javax.swing.JButton next_jButton; private javax.swing.JButton printout_jButton; // End of variables declaration//GEN-END:variables } |
TravelAgencyGUI.form
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 |
<?xml version="1.0" encoding="UTF-8" ?> <Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> <Properties> <Property name="defaultCloseOperation" type="int" value="3"/> </Properties> <SyntheticProperties> <SyntheticProperty name="formSizePolicy" type="int" value="1"/> <SyntheticProperty name="generateCenter" type="boolean" value="false"/> </SyntheticProperties> <AuxValues> <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> </AuxValues> <Layout> <DimensionLayout dim="0"> <Group type="103" groupAlignment="0" attributes="0"> <Group type="102" alignment="0" attributes="0"> <EmptySpace max="-2" attributes="0"/> <Group type="103" groupAlignment="1" max="-2" attributes="0"> <Component id="jPanel2" max="32767" attributes="0"/> <Component id="jPanel1" alignment="1" max="32767" attributes="0"/> </Group> <EmptySpace max="32767" attributes="0"/> </Group> <Group type="102" alignment="1" attributes="0"> <EmptySpace max="32767" attributes="0"/> <Component id="jLabel1" min="-2" max="-2" attributes="0"/> <EmptySpace min="-2" pref="44" max="-2" attributes="0"/> </Group> </Group> </DimensionLayout> <DimensionLayout dim="1"> <Group type="103" groupAlignment="0" attributes="0"> <Group type="102" alignment="0" attributes="0"> <EmptySpace min="-2" pref="21" max="-2" attributes="0"/> <Component id="jLabel1" min="-2" max="-2" attributes="0"/> <EmptySpace min="-2" pref="29" max="-2" attributes="0"/> <Component id="jPanel1" min="-2" max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/> <Component id="jPanel2" max="32767" attributes="0"/> <EmptySpace max="-2" attributes="0"/> </Group> </Group> </DimensionLayout> </Layout> <SubComponents> <Container class="javax.swing.JPanel" name="jPanel1"> <Properties> <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> <Border info="org.netbeans.modules.form.compat2.border.BevelBorderInfo"> <BevelBorder/> </Border> </Property> </Properties> <Layout> <DimensionLayout dim="0"> <Group type="103" groupAlignment="0" attributes="0"> <Group type="102" alignment="1" attributes="0"> <EmptySpace max="32767" attributes="0"/> <Group type="103" groupAlignment="0" attributes="0"> <Component id="jLabel4" alignment="1" min="-2" max="-2" attributes="0"/> <Component id="jLabel2" alignment="1" min="-2" max="-2" attributes="0"/> </Group> <EmptySpace max="-2" attributes="0"/> <Group type="103" groupAlignment="0" attributes="0"> <Group type="103" groupAlignment="0" max="-2" attributes="0"> <Component id="budget_jTextField" max="32767" attributes="0"/> <Component id="addCustomer_jButton" alignment="0" pref="424" max="32767" attributes="0"/> </Group> <Component id="name_jTextField" min="-2" pref="424" max="-2" attributes="0"/> </Group> <EmptySpace max="-2" attributes="0"/> </Group> </Group> </DimensionLayout> <DimensionLayout dim="1"> <Group type="103" groupAlignment="0" attributes="0"> <Group type="102" alignment="0" attributes="0"> <EmptySpace min="-2" pref="17" max="-2" attributes="0"/> <Group type="103" groupAlignment="3" attributes="0"> <Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/> <Component id="name_jTextField" alignment="3" min="-2" max="-2" attributes="0"/> </Group> <EmptySpace min="-2" pref="9" max="-2" attributes="0"/> <Group type="103" groupAlignment="3" attributes="0"> <Component id="jLabel4" alignment="3" min="-2" max="-2" attributes="0"/> <Component id="budget_jTextField" alignment="3" min="-2" max="-2" attributes="0"/> </Group> <EmptySpace max="-2" attributes="0"/> <Component id="addCustomer_jButton" min="-2" max="-2" attributes="0"/> <EmptySpace max="32767" attributes="0"/> </Group> </Group> </DimensionLayout> </Layout> <SubComponents> <Component class="javax.swing.JLabel" name="jLabel2"> <Properties> <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> <Font name="Tahoma" size="11" style="1"/> </Property> <Property name="text" type="java.lang.String" value="Customer name:"/> </Properties> </Component> <Component class="javax.swing.JTextField" name="name_jTextField"> <Events> <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="name_jTextFieldActionPerformed"/> </Events> </Component> <Component class="javax.swing.JLabel" name="jLabel4"> <Properties> <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> <Font name="Tahoma" size="11" style="1"/> </Property> <Property name="text" type="java.lang.String" value="Budget (Euro/person):"/> </Properties> </Component> <Component class="javax.swing.JTextField" name="budget_jTextField"> <Events> <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="budget_jTextFieldActionPerformed"/> </Events> </Component> <Component class="javax.swing.JButton" name="addCustomer_jButton"> <Properties> <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> <Font name="Tahoma" size="11" style="1"/> </Property> <Property name="text" type="java.lang.String" value="Add customer to waiting line"/> </Properties> <Events> <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="addCustomer_jButtonActionPerformed"/> </Events> </Component> </SubComponents> </Container> <Component class="javax.swing.JLabel" name="jLabel1"> <Properties> <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> <Font name="Tahoma" size="18" style="1"/> </Property> <Property name="text" type="java.lang.String" value="Travel Agency - Telephone line management system"/> </Properties> </Component> <Container class="javax.swing.JPanel" name="jPanel2"> <Properties> <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> <Border info="org.netbeans.modules.form.compat2.border.BevelBorderInfo"> <BevelBorder/> </Border> </Property> </Properties> <Layout> <DimensionLayout dim="0"> <Group type="103" groupAlignment="0" attributes="0"> <Group type="102" alignment="0" attributes="0"> <EmptySpace max="-2" attributes="0"/> <Group type="103" groupAlignment="0" attributes="0"> <Component id="jScrollPane1" max="32767" attributes="0"/> <Group type="102" attributes="0"> <Group type="103" groupAlignment="0" attributes="0"> <Component id="printout_jButton" alignment="0" max="32767" attributes="0"/> <Component id="next_jButton" alignment="0" max="32767" attributes="0"/> </Group> <EmptySpace max="-2" attributes="0"/> <Component id="exit_jButton" min="-2" pref="177" max="-2" attributes="0"/> </Group> </Group> <EmptySpace max="-2" attributes="0"/> </Group> </Group> </DimensionLayout> <DimensionLayout dim="1"> <Group type="103" groupAlignment="0" attributes="0"> <Group type="102" alignment="0" attributes="0"> <EmptySpace max="-2" attributes="0"/> <Component id="jScrollPane1" pref="189" max="32767" attributes="0"/> <EmptySpace max="-2" attributes="0"/> <Group type="103" groupAlignment="0" max="-2" attributes="0"> <Group type="102" alignment="0" attributes="0"> <Component id="printout_jButton" min="-2" pref="41" max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/> <Component id="next_jButton" min="-2" pref="43" max="-2" attributes="0"/> </Group> <Component id="exit_jButton" min="-2" pref="90" max="-2" attributes="0"/> </Group> <EmptySpace max="-2" attributes="0"/> </Group> </Group> </DimensionLayout> </Layout> <SubComponents> <Container class="javax.swing.JScrollPane" name="jScrollPane1"> <AuxValues> <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> </AuxValues> <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> <SubComponents> <Component class="javax.swing.JTextArea" name="log_jTextArea"> <Properties> <Property name="columns" type="int" value="20"/> <Property name="rows" type="int" value="5"/> </Properties> </Component> </SubComponents> </Container> <Component class="javax.swing.JButton" name="printout_jButton"> <Properties> <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> <Font name="Tahoma" size="11" style="1"/> </Property> <Property name="text" type="java.lang.String" value="Printout waiting line info"/> </Properties> <Events> <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="printout_jButtonActionPerformed"/> </Events> </Component> <Component class="javax.swing.JButton" name="next_jButton"> <Properties> <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> <Font name="Tahoma" size="11" style="1"/> </Property> <Property name="text" type="java.lang.String" value="Take next call"/> </Properties> <Events> <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="next_jButtonActionPerformed"/> </Events> </Component> <Component class="javax.swing.JButton" name="exit_jButton"> <Properties> <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> <Font name="Tahoma" size="11" style="1"/> </Property> <Property name="text" type="java.lang.String" value="EXIT"/> </Properties> <Events> <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="exit_jButtonActionPerformed"/> </Events> </Component> </SubComponents> </Container> </SubComponents> </Form> |