thufir

log error

Jul 27th, 2014
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 20.87 KB | None | 0 0
  1. BUILD SUCCESSFUL
  2. Total time: 4 seconds
  3. Jul 27, 2014 12:07:06 AM net.bounceme.dur.client.gui.TitlesGUI <init>
  4. INFO: starting log..
  5. Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
  6.     at net.bounceme.dur.client.gui.TitlesGUI.nextTitleActionPerformed(TitlesGUI.java:285)
  7.     at net.bounceme.dur.client.gui.TitlesGUI.access$000(TitlesGUI.java:11)
  8.     at net.bounceme.dur.client.gui.TitlesGUI$1.actionPerformed(TitlesGUI.java:79)
  9.     at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
  10.     at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
  11.     at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
  12.     at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
  13.     at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
  14.     at java.awt.Component.processMouseEvent(Component.java:6505)
  15.     at javax.swing.JComponent.processMouseEvent(JComponent.java:3311)
  16.     at java.awt.Component.processEvent(Component.java:6270)
  17.     at java.awt.Container.processEvent(Container.java:2229)
  18.     at java.awt.Component.dispatchEventImpl(Component.java:4861)
  19.     at java.awt.Container.dispatchEventImpl(Container.java:2287)
  20.     at java.awt.Component.dispatchEvent(Component.java:4687)
  21.     at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
  22.     at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
  23.     at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
  24.     at java.awt.Container.dispatchEventImpl(Container.java:2273)
  25.     at java.awt.Window.dispatchEventImpl(Window.java:2719)
  26.     at java.awt.Component.dispatchEvent(Component.java:4687)
  27.     at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:735)
  28.     at java.awt.EventQueue.access$200(EventQueue.java:103)
  29.     at java.awt.EventQueue$3.run(EventQueue.java:694)
  30.     at java.awt.EventQueue$3.run(EventQueue.java:692)
  31.     at java.security.AccessController.doPrivileged(Native Method)
  32.     at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
  33.     at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
  34.     at java.awt.EventQueue$4.run(EventQueue.java:708)
  35.     at java.awt.EventQueue$4.run(EventQueue.java:706)
  36.     at java.security.AccessController.doPrivileged(Native Method)
  37.     at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
  38.     at java.awt.EventQueue.dispatchEvent(EventQueue.java:705)
  39.     at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
  40.     at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
  41.     at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
  42.     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
  43.     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
  44.     at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
  45. thufir@dur:~/NetBeansProjects/AgentClient$
  46.  
  47.  
  48.  
  49. package net.bounceme.dur.client.gui;
  50.  
  51. import java.io.IOException;
  52. import java.sql.Timestamp;
  53. import java.util.Date;
  54. import java.util.logging.FileHandler;
  55. import java.util.logging.Logger;
  56. import net.bounceme.dur.client.jdbc.State;
  57. import net.bounceme.dur.client.jdbc.Title;
  58.  
  59. public final class TitlesGUI extends javax.swing.JFrame {
  60.  
  61.     private static final Logger log = Logger.getLogger(TitlesGUI.class.getName());
  62.     private Title title = null;
  63.     private FileHandler fh = null;
  64.  
  65.     public TitlesGUI() throws IOException {
  66.         initComponents();
  67.         fh = new FileHandler("gui.log");
  68.         log.addHandler(fh);
  69.         log.info("starting log..");
  70.     }
  71.  
  72.     public void setTitle(Title title) {
  73.         this.title = title;
  74.         text.setText(title.toString());
  75.     }
  76.  
  77.  
  78.     /*
  79.      public static void main(String... args) {
  80.      java.awt.EventQueue.invokeLater(new Runnable() {
  81.      @Override
  82.      public void run() {
  83.      new TitlesGUI().setVisible(true);
  84.      }
  85.      });
  86.      }
  87.      */
  88.     /**
  89.      * This method is called from within the constructor to initialize the form.
  90.      * WARNING: Do NOT modify this code. The content of this method is always
  91.      * regenerated by the Form Editor.
  92.      */
  93.     @SuppressWarnings("unchecked")
  94.     // <editor-fold defaultstate="collapsed" desc="Generated Code">                          
  95.     private void initComponents() {
  96.  
  97.         stateGroup = new javax.swing.ButtonGroup();
  98.         jTabbedPane1 = new javax.swing.JTabbedPane();
  99.         titlePanel = new javax.swing.JPanel();
  100.         a = new javax.swing.JScrollPane();
  101.         text = new javax.swing.JTextPane();
  102.         nextTitle = new javax.swing.JButton();
  103.         open = new javax.swing.JRadioButton();
  104.         close = new javax.swing.JRadioButton();
  105.         answer = new javax.swing.JRadioButton();
  106.         back = new javax.swing.JRadioButton();
  107.         data = new javax.swing.JRadioButton();
  108.         esl = new javax.swing.JRadioButton();
  109.         name = new javax.swing.JTextField();
  110.         phone = new javax.swing.JTextField();
  111.         city = new javax.swing.JTextField();
  112.         province = new javax.swing.JTextField();
  113.         make = new javax.swing.JTextField();
  114.         year = new javax.swing.JTextField();
  115.         model = new javax.swing.JTextField();
  116.         kilometers = new javax.swing.JTextField();
  117.         name1 = new javax.swing.JTextField();
  118.         jTabbedPane2 = new javax.swing.JTabbedPane();
  119.  
  120.         setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
  121.  
  122.         a.setViewportView(text);
  123.  
  124.         nextTitle.setText("next");
  125.         nextTitle.addActionListener(new java.awt.event.ActionListener() {
  126.             public void actionPerformed(java.awt.event.ActionEvent evt) {
  127.                 nextTitleActionPerformed(evt);
  128.             }
  129.         });
  130.  
  131.         stateGroup.add(open);
  132.         open.setText("open");
  133.         open.addActionListener(new java.awt.event.ActionListener() {
  134.             public void actionPerformed(java.awt.event.ActionEvent evt) {
  135.                 openActionPerformed(evt);
  136.             }
  137.         });
  138.  
  139.         stateGroup.add(close);
  140.         close.setText("close");
  141.  
  142.         stateGroup.add(answer);
  143.         answer.setSelected(true);
  144.         answer.setText("no answer");
  145.  
  146.         stateGroup.add(back);
  147.         back.setText("call back");
  148.  
  149.         stateGroup.add(data);
  150.         data.setText("bad data");
  151.  
  152.         stateGroup.add(esl);
  153.         esl.setText("esl");
  154.  
  155.         name.setText("comments");
  156.         name.addActionListener(new java.awt.event.ActionListener() {
  157.             public void actionPerformed(java.awt.event.ActionEvent evt) {
  158.                 nameActionPerformed(evt);
  159.             }
  160.         });
  161.  
  162.         phone.setText("phone");
  163.         phone.addActionListener(new java.awt.event.ActionListener() {
  164.             public void actionPerformed(java.awt.event.ActionEvent evt) {
  165.                 phoneActionPerformed(evt);
  166.             }
  167.         });
  168.  
  169.         city.setText("city");
  170.         city.addActionListener(new java.awt.event.ActionListener() {
  171.             public void actionPerformed(java.awt.event.ActionEvent evt) {
  172.                 cityActionPerformed(evt);
  173.             }
  174.         });
  175.  
  176.         province.setText("province");
  177.         province.addActionListener(new java.awt.event.ActionListener() {
  178.             public void actionPerformed(java.awt.event.ActionEvent evt) {
  179.                 provinceActionPerformed(evt);
  180.             }
  181.         });
  182.  
  183.         make.setText("make");
  184.         make.addActionListener(new java.awt.event.ActionListener() {
  185.             public void actionPerformed(java.awt.event.ActionEvent evt) {
  186.                 makeActionPerformed(evt);
  187.             }
  188.         });
  189.  
  190.         year.setText("year");
  191.         year.addActionListener(new java.awt.event.ActionListener() {
  192.             public void actionPerformed(java.awt.event.ActionEvent evt) {
  193.                 yearActionPerformed(evt);
  194.             }
  195.         });
  196.  
  197.         model.setText("model");
  198.         model.addActionListener(new java.awt.event.ActionListener() {
  199.             public void actionPerformed(java.awt.event.ActionEvent evt) {
  200.                 modelActionPerformed(evt);
  201.             }
  202.         });
  203.  
  204.         kilometers.setText("kilometers");
  205.         kilometers.addActionListener(new java.awt.event.ActionListener() {
  206.             public void actionPerformed(java.awt.event.ActionEvent evt) {
  207.                 kilometersActionPerformed(evt);
  208.             }
  209.         });
  210.  
  211.         name1.setText("name");
  212.         name1.addActionListener(new java.awt.event.ActionListener() {
  213.             public void actionPerformed(java.awt.event.ActionEvent evt) {
  214.                 name1ActionPerformed(evt);
  215.             }
  216.         });
  217.  
  218.         javax.swing.GroupLayout titlePanelLayout = new javax.swing.GroupLayout(titlePanel);
  219.         titlePanel.setLayout(titlePanelLayout);
  220.         titlePanelLayout.setHorizontalGroup(
  221.             titlePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  222.             .addGroup(titlePanelLayout.createSequentialGroup()
  223.                 .addContainerGap()
  224.                 .addGroup(titlePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  225.                     .addGroup(titlePanelLayout.createSequentialGroup()
  226.                         .addGroup(titlePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  227.                             .addGroup(titlePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
  228.                                 .addComponent(make, javax.swing.GroupLayout.PREFERRED_SIZE, 155, javax.swing.GroupLayout.PREFERRED_SIZE)
  229.                                 .addComponent(name1, javax.swing.GroupLayout.PREFERRED_SIZE, 155, javax.swing.GroupLayout.PREFERRED_SIZE))
  230.                             .addComponent(province, javax.swing.GroupLayout.PREFERRED_SIZE, 155, javax.swing.GroupLayout.PREFERRED_SIZE))
  231.                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
  232.                         .addGroup(titlePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  233.                             .addComponent(city, javax.swing.GroupLayout.PREFERRED_SIZE, 155, javax.swing.GroupLayout.PREFERRED_SIZE)
  234.                             .addComponent(year, javax.swing.GroupLayout.PREFERRED_SIZE, 155, javax.swing.GroupLayout.PREFERRED_SIZE)
  235.                             .addComponent(phone, javax.swing.GroupLayout.PREFERRED_SIZE, 155, javax.swing.GroupLayout.PREFERRED_SIZE))
  236.                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
  237.                         .addGroup(titlePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  238.                             .addComponent(kilometers, javax.swing.GroupLayout.PREFERRED_SIZE, 155, javax.swing.GroupLayout.PREFERRED_SIZE)
  239.                             .addComponent(model, javax.swing.GroupLayout.PREFERRED_SIZE, 155, javax.swing.GroupLayout.PREFERRED_SIZE))
  240.                         .addGap(0, 0, Short.MAX_VALUE))
  241.                     .addGroup(titlePanelLayout.createSequentialGroup()
  242.                         .addComponent(a, javax.swing.GroupLayout.PREFERRED_SIZE, 626, javax.swing.GroupLayout.PREFERRED_SIZE)
  243.                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 94, Short.MAX_VALUE)
  244.                         .addGroup(titlePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  245.                             .addComponent(close, javax.swing.GroupLayout.Alignment.TRAILING)
  246.                             .addComponent(open, javax.swing.GroupLayout.Alignment.TRAILING)))
  247.                     .addGroup(titlePanelLayout.createSequentialGroup()
  248.                         .addComponent(name)
  249.                         .addGap(58, 58, 58)
  250.                         .addGroup(titlePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  251.                             .addComponent(answer)
  252.                             .addGroup(titlePanelLayout.createSequentialGroup()
  253.                                 .addGap(12, 12, 12)
  254.                                 .addGroup(titlePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  255.                                     .addComponent(nextTitle)
  256.                                     .addGroup(titlePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
  257.                                         .addComponent(data)
  258.                                         .addComponent(back)
  259.                                         .addComponent(esl))))))))
  260.         );
  261.         titlePanelLayout.setVerticalGroup(
  262.             titlePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  263.             .addGroup(titlePanelLayout.createSequentialGroup()
  264.                 .addGap(18, 18, 18)
  265.                 .addGroup(titlePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  266.                     .addGroup(titlePanelLayout.createSequentialGroup()
  267.                         .addComponent(open)
  268.                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  269.                         .addComponent(close)
  270.                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  271.                         .addComponent(answer))
  272.                     .addComponent(a, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE))
  273.                 .addGroup(titlePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  274.                     .addGroup(titlePanelLayout.createSequentialGroup()
  275.                         .addGap(32, 32, 32)
  276.                         .addGroup(titlePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  277.                             .addComponent(phone, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
  278.                             .addComponent(name1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
  279.                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  280.                         .addGroup(titlePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  281.                             .addComponent(make, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
  282.                             .addComponent(year, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
  283.                             .addComponent(model, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
  284.                     .addGroup(titlePanelLayout.createSequentialGroup()
  285.                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  286.                         .addComponent(back)
  287.                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  288.                         .addComponent(data)
  289.                         .addGap(8, 8, 8)
  290.                         .addComponent(esl)))
  291.                 .addGap(8, 8, 8)
  292.                 .addGroup(titlePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  293.                     .addComponent(province, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
  294.                     .addComponent(city, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
  295.                     .addComponent(kilometers, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
  296.                 .addGap(10, 10, 10)
  297.                 .addGroup(titlePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  298.                     .addGroup(titlePanelLayout.createSequentialGroup()
  299.                         .addComponent(name, javax.swing.GroupLayout.DEFAULT_SIZE, 128, Short.MAX_VALUE)
  300.                         .addGap(60, 60, 60))
  301.                     .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, titlePanelLayout.createSequentialGroup()
  302.                         .addComponent(nextTitle)
  303.                         .addGap(34, 34, 34))))
  304.         );
  305.  
  306.         jTabbedPane1.addTab("tab1", titlePanel);
  307.         jTabbedPane1.addTab("tab2", jTabbedPane2);
  308.  
  309.         javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
  310.         getContentPane().setLayout(layout);
  311.         layout.setHorizontalGroup(
  312.             layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  313.             .addGroup(layout.createSequentialGroup()
  314.                 .addGap(26, 26, 26)
  315.                 .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 803, javax.swing.GroupLayout.PREFERRED_SIZE)
  316.                 .addContainerGap(30, Short.MAX_VALUE))
  317.         );
  318.         layout.setVerticalGroup(
  319.             layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  320.             .addGroup(layout.createSequentialGroup()
  321.                 .addContainerGap()
  322.                 .addComponent(jTabbedPane1)
  323.                 .addContainerGap())
  324.         );
  325.  
  326.         pack();
  327.     }// </editor-fold>                        
  328.  
  329.     private void nextTitleActionPerformed(java.awt.event.ActionEvent evt) {                                          
  330.         title = null;
  331.         Date date = new Date();
  332.         Timestamp timestamp = new Timestamp(date.getTime());
  333.         log.info(title.toString());
  334.         title.setTitle("modified from GUI");
  335.         title.setState(State.undefined);
  336.         text.setText(title.toString());
  337.         title.setStateTimestamp(timestamp);
  338.     }                                        
  339.  
  340.     private void openActionPerformed(java.awt.event.ActionEvent evt) {                                    
  341.         // TODO add your handling code here:
  342.     }                                    
  343.  
  344.     private void nameActionPerformed(java.awt.event.ActionEvent evt) {                                    
  345.         // TODO add your handling code here:
  346.     }                                    
  347.  
  348.     private void phoneActionPerformed(java.awt.event.ActionEvent evt) {                                      
  349.         // TODO add your handling code here:
  350.     }                                    
  351.  
  352.     private void cityActionPerformed(java.awt.event.ActionEvent evt) {                                    
  353.         // TODO add your handling code here:
  354.     }                                    
  355.  
  356.     private void provinceActionPerformed(java.awt.event.ActionEvent evt) {                                        
  357.         // TODO add your handling code here:
  358.     }                                        
  359.  
  360.     private void makeActionPerformed(java.awt.event.ActionEvent evt) {                                    
  361.         // TODO add your handling code here:
  362.     }                                    
  363.  
  364.     private void yearActionPerformed(java.awt.event.ActionEvent evt) {                                    
  365.         // TODO add your handling code here:
  366.     }                                    
  367.  
  368.     private void modelActionPerformed(java.awt.event.ActionEvent evt) {                                      
  369.         // TODO add your handling code here:
  370.     }                                    
  371.  
  372.     private void kilometersActionPerformed(java.awt.event.ActionEvent evt) {                                          
  373.         // TODO add your handling code here:
  374.     }                                          
  375.  
  376.     private void name1ActionPerformed(java.awt.event.ActionEvent evt) {                                      
  377.         // TODO add your handling code here:
  378.     }                                    
  379.  
  380.  
  381.     // Variables declaration - do not modify                    
  382.     private javax.swing.JScrollPane a;
  383.     private javax.swing.JRadioButton answer;
  384.     private javax.swing.JRadioButton back;
  385.     private javax.swing.JTextField city;
  386.     private javax.swing.JRadioButton close;
  387.     private javax.swing.JRadioButton data;
  388.     private javax.swing.JRadioButton esl;
  389.     private javax.swing.JTabbedPane jTabbedPane1;
  390.     private javax.swing.JTabbedPane jTabbedPane2;
  391.     private javax.swing.JTextField kilometers;
  392.     private javax.swing.JTextField make;
  393.     private javax.swing.JTextField model;
  394.     private javax.swing.JTextField name;
  395.     private javax.swing.JTextField name1;
  396.     private javax.swing.JButton nextTitle;
  397.     private javax.swing.JRadioButton open;
  398.     private javax.swing.JTextField phone;
  399.     private javax.swing.JTextField province;
  400.     private javax.swing.ButtonGroup stateGroup;
  401.     private javax.swing.JTextPane text;
  402.     private javax.swing.JPanel titlePanel;
  403.     private javax.swing.JTextField year;
  404.     // End of variables declaration                  
  405.  
  406. }
Advertisement
Add Comment
Please, Sign In to add comment