Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- BUILD SUCCESSFUL
- Total time: 4 seconds
- Jul 27, 2014 12:07:06 AM net.bounceme.dur.client.gui.TitlesGUI <init>
- INFO: starting log..
- Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
- at net.bounceme.dur.client.gui.TitlesGUI.nextTitleActionPerformed(TitlesGUI.java:285)
- at net.bounceme.dur.client.gui.TitlesGUI.access$000(TitlesGUI.java:11)
- at net.bounceme.dur.client.gui.TitlesGUI$1.actionPerformed(TitlesGUI.java:79)
- at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
- at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
- at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
- at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
- at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
- at java.awt.Component.processMouseEvent(Component.java:6505)
- at javax.swing.JComponent.processMouseEvent(JComponent.java:3311)
- at java.awt.Component.processEvent(Component.java:6270)
- at java.awt.Container.processEvent(Container.java:2229)
- at java.awt.Component.dispatchEventImpl(Component.java:4861)
- at java.awt.Container.dispatchEventImpl(Container.java:2287)
- at java.awt.Component.dispatchEvent(Component.java:4687)
- at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
- at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
- at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
- at java.awt.Container.dispatchEventImpl(Container.java:2273)
- at java.awt.Window.dispatchEventImpl(Window.java:2719)
- at java.awt.Component.dispatchEvent(Component.java:4687)
- at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:735)
- at java.awt.EventQueue.access$200(EventQueue.java:103)
- at java.awt.EventQueue$3.run(EventQueue.java:694)
- at java.awt.EventQueue$3.run(EventQueue.java:692)
- at java.security.AccessController.doPrivileged(Native Method)
- at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
- at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
- at java.awt.EventQueue$4.run(EventQueue.java:708)
- at java.awt.EventQueue$4.run(EventQueue.java:706)
- at java.security.AccessController.doPrivileged(Native Method)
- at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
- at java.awt.EventQueue.dispatchEvent(EventQueue.java:705)
- at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
- at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
- at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
- at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
- at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
- at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
- thufir@dur:~/NetBeansProjects/AgentClient$
- package net.bounceme.dur.client.gui;
- import java.io.IOException;
- import java.sql.Timestamp;
- import java.util.Date;
- import java.util.logging.FileHandler;
- import java.util.logging.Logger;
- import net.bounceme.dur.client.jdbc.State;
- import net.bounceme.dur.client.jdbc.Title;
- public final class TitlesGUI extends javax.swing.JFrame {
- private static final Logger log = Logger.getLogger(TitlesGUI.class.getName());
- private Title title = null;
- private FileHandler fh = null;
- public TitlesGUI() throws IOException {
- initComponents();
- fh = new FileHandler("gui.log");
- log.addHandler(fh);
- log.info("starting log..");
- }
- public void setTitle(Title title) {
- this.title = title;
- text.setText(title.toString());
- }
- /*
- public static void main(String... args) {
- java.awt.EventQueue.invokeLater(new Runnable() {
- @Override
- public void run() {
- new TitlesGUI().setVisible(true);
- }
- });
- }
- */
- /**
- * 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">
- private void initComponents() {
- stateGroup = new javax.swing.ButtonGroup();
- jTabbedPane1 = new javax.swing.JTabbedPane();
- titlePanel = new javax.swing.JPanel();
- a = new javax.swing.JScrollPane();
- text = new javax.swing.JTextPane();
- nextTitle = new javax.swing.JButton();
- open = new javax.swing.JRadioButton();
- close = new javax.swing.JRadioButton();
- answer = new javax.swing.JRadioButton();
- back = new javax.swing.JRadioButton();
- data = new javax.swing.JRadioButton();
- esl = new javax.swing.JRadioButton();
- name = new javax.swing.JTextField();
- phone = new javax.swing.JTextField();
- city = new javax.swing.JTextField();
- province = new javax.swing.JTextField();
- make = new javax.swing.JTextField();
- year = new javax.swing.JTextField();
- model = new javax.swing.JTextField();
- kilometers = new javax.swing.JTextField();
- name1 = new javax.swing.JTextField();
- jTabbedPane2 = new javax.swing.JTabbedPane();
- setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
- a.setViewportView(text);
- nextTitle.setText("next");
- nextTitle.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- nextTitleActionPerformed(evt);
- }
- });
- stateGroup.add(open);
- open.setText("open");
- open.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- openActionPerformed(evt);
- }
- });
- stateGroup.add(close);
- close.setText("close");
- stateGroup.add(answer);
- answer.setSelected(true);
- answer.setText("no answer");
- stateGroup.add(back);
- back.setText("call back");
- stateGroup.add(data);
- data.setText("bad data");
- stateGroup.add(esl);
- esl.setText("esl");
- name.setText("comments");
- name.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- nameActionPerformed(evt);
- }
- });
- phone.setText("phone");
- phone.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- phoneActionPerformed(evt);
- }
- });
- city.setText("city");
- city.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- cityActionPerformed(evt);
- }
- });
- province.setText("province");
- province.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- provinceActionPerformed(evt);
- }
- });
- make.setText("make");
- make.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- makeActionPerformed(evt);
- }
- });
- year.setText("year");
- year.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- yearActionPerformed(evt);
- }
- });
- model.setText("model");
- model.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- modelActionPerformed(evt);
- }
- });
- kilometers.setText("kilometers");
- kilometers.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- kilometersActionPerformed(evt);
- }
- });
- name1.setText("name");
- name1.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- name1ActionPerformed(evt);
- }
- });
- javax.swing.GroupLayout titlePanelLayout = new javax.swing.GroupLayout(titlePanel);
- titlePanel.setLayout(titlePanelLayout);
- titlePanelLayout.setHorizontalGroup(
- titlePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(titlePanelLayout.createSequentialGroup()
- .addContainerGap()
- .addGroup(titlePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(titlePanelLayout.createSequentialGroup()
- .addGroup(titlePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(titlePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
- .addComponent(make, javax.swing.GroupLayout.PREFERRED_SIZE, 155, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addComponent(name1, javax.swing.GroupLayout.PREFERRED_SIZE, 155, javax.swing.GroupLayout.PREFERRED_SIZE))
- .addComponent(province, javax.swing.GroupLayout.PREFERRED_SIZE, 155, javax.swing.GroupLayout.PREFERRED_SIZE))
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
- .addGroup(titlePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(city, javax.swing.GroupLayout.PREFERRED_SIZE, 155, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addComponent(year, javax.swing.GroupLayout.PREFERRED_SIZE, 155, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addComponent(phone, javax.swing.GroupLayout.PREFERRED_SIZE, 155, javax.swing.GroupLayout.PREFERRED_SIZE))
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
- .addGroup(titlePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(kilometers, javax.swing.GroupLayout.PREFERRED_SIZE, 155, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addComponent(model, javax.swing.GroupLayout.PREFERRED_SIZE, 155, javax.swing.GroupLayout.PREFERRED_SIZE))
- .addGap(0, 0, Short.MAX_VALUE))
- .addGroup(titlePanelLayout.createSequentialGroup()
- .addComponent(a, javax.swing.GroupLayout.PREFERRED_SIZE, 626, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 94, Short.MAX_VALUE)
- .addGroup(titlePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(close, javax.swing.GroupLayout.Alignment.TRAILING)
- .addComponent(open, javax.swing.GroupLayout.Alignment.TRAILING)))
- .addGroup(titlePanelLayout.createSequentialGroup()
- .addComponent(name)
- .addGap(58, 58, 58)
- .addGroup(titlePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(answer)
- .addGroup(titlePanelLayout.createSequentialGroup()
- .addGap(12, 12, 12)
- .addGroup(titlePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(nextTitle)
- .addGroup(titlePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
- .addComponent(data)
- .addComponent(back)
- .addComponent(esl))))))))
- );
- titlePanelLayout.setVerticalGroup(
- titlePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(titlePanelLayout.createSequentialGroup()
- .addGap(18, 18, 18)
- .addGroup(titlePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(titlePanelLayout.createSequentialGroup()
- .addComponent(open)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(close)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(answer))
- .addComponent(a, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE))
- .addGroup(titlePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(titlePanelLayout.createSequentialGroup()
- .addGap(32, 32, 32)
- .addGroup(titlePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
- .addComponent(phone, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addComponent(name1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addGroup(titlePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
- .addComponent(make, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addComponent(year, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addComponent(model, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
- .addGroup(titlePanelLayout.createSequentialGroup()
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(back)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(data)
- .addGap(8, 8, 8)
- .addComponent(esl)))
- .addGap(8, 8, 8)
- .addGroup(titlePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
- .addComponent(province, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addComponent(city, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addComponent(kilometers, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
- .addGap(10, 10, 10)
- .addGroup(titlePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(titlePanelLayout.createSequentialGroup()
- .addComponent(name, javax.swing.GroupLayout.DEFAULT_SIZE, 128, Short.MAX_VALUE)
- .addGap(60, 60, 60))
- .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, titlePanelLayout.createSequentialGroup()
- .addComponent(nextTitle)
- .addGap(34, 34, 34))))
- );
- jTabbedPane1.addTab("tab1", titlePanel);
- jTabbedPane1.addTab("tab2", jTabbedPane2);
- javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
- getContentPane().setLayout(layout);
- layout.setHorizontalGroup(
- layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(layout.createSequentialGroup()
- .addGap(26, 26, 26)
- .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 803, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addContainerGap(30, Short.MAX_VALUE))
- );
- layout.setVerticalGroup(
- layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(layout.createSequentialGroup()
- .addContainerGap()
- .addComponent(jTabbedPane1)
- .addContainerGap())
- );
- pack();
- }// </editor-fold>
- private void nextTitleActionPerformed(java.awt.event.ActionEvent evt) {
- title = null;
- Date date = new Date();
- Timestamp timestamp = new Timestamp(date.getTime());
- log.info(title.toString());
- title.setTitle("modified from GUI");
- title.setState(State.undefined);
- text.setText(title.toString());
- title.setStateTimestamp(timestamp);
- }
- private void openActionPerformed(java.awt.event.ActionEvent evt) {
- // TODO add your handling code here:
- }
- private void nameActionPerformed(java.awt.event.ActionEvent evt) {
- // TODO add your handling code here:
- }
- private void phoneActionPerformed(java.awt.event.ActionEvent evt) {
- // TODO add your handling code here:
- }
- private void cityActionPerformed(java.awt.event.ActionEvent evt) {
- // TODO add your handling code here:
- }
- private void provinceActionPerformed(java.awt.event.ActionEvent evt) {
- // TODO add your handling code here:
- }
- private void makeActionPerformed(java.awt.event.ActionEvent evt) {
- // TODO add your handling code here:
- }
- private void yearActionPerformed(java.awt.event.ActionEvent evt) {
- // TODO add your handling code here:
- }
- private void modelActionPerformed(java.awt.event.ActionEvent evt) {
- // TODO add your handling code here:
- }
- private void kilometersActionPerformed(java.awt.event.ActionEvent evt) {
- // TODO add your handling code here:
- }
- private void name1ActionPerformed(java.awt.event.ActionEvent evt) {
- // TODO add your handling code here:
- }
- // Variables declaration - do not modify
- private javax.swing.JScrollPane a;
- private javax.swing.JRadioButton answer;
- private javax.swing.JRadioButton back;
- private javax.swing.JTextField city;
- private javax.swing.JRadioButton close;
- private javax.swing.JRadioButton data;
- private javax.swing.JRadioButton esl;
- private javax.swing.JTabbedPane jTabbedPane1;
- private javax.swing.JTabbedPane jTabbedPane2;
- private javax.swing.JTextField kilometers;
- private javax.swing.JTextField make;
- private javax.swing.JTextField model;
- private javax.swing.JTextField name;
- private javax.swing.JTextField name1;
- private javax.swing.JButton nextTitle;
- private javax.swing.JRadioButton open;
- private javax.swing.JTextField phone;
- private javax.swing.JTextField province;
- private javax.swing.ButtonGroup stateGroup;
- private javax.swing.JTextPane text;
- private javax.swing.JPanel titlePanel;
- private javax.swing.JTextField year;
- // End of variables declaration
- }
Advertisement
Add Comment
Please, Sign In to add comment