473,785 Members | 2,440 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Exception in thread "main" java.lang.NullP ointerException

1 New Member
Hi this is the exception i am getting when i am trying to run this application:
Exception in thread "main" java.lang.NullP ointerException

thanks in advance..

package com.inventive.S tockMarketTradi ng;

import java.awt.Border Layout;
import java.awt.Dimens ion;
import java.awt.event. ActionEvent;
import java.awt.event. WindowAdapter;
import java.awt.event. WindowEvent;

import javax.swing.JFr ame;
import javax.swing.JPa nel;
import javax.swing.JSc rollPane;
import javax.swing.JTa ble;

/**
* @author inv
*
*/
public class TransactionsVie w extends JFrame{
private boolean DEBUG = true;

// Constructor Which takes care of the Components layout
public TransactionsVie w()
{
//super("JTableDe mo");
TransactionsMod el model = new TransactionsMod el();
TransactionsTab leSorter sorter = new TransactionsTab leSorter(model) ;
JTable table = new JTable(model);
sorter.addMouse ListenerToTable (table);
table.setPrefer redScrollableVi ewportSize(new Dimension(500, 70));
JScrollPane scrollPane = new JScrollPane(tab le);
getContentPane( ).add(scrollPan e, BorderLayout.CE NTER);

addWindowListen er(new WindowAdapter() {
public void windowClosing(W indowEvent e) {
System.exit(0);
}
});
}

public static void main(String[] args)
{
System.out.prin tln("inside main method");
TransactionsVie w view = new TransactionsVie w();
System.out.prin tln("after constructor call");
view.pack();
view.setVisible (true);
}

}
Dec 26 '07 #1
1 1789
dmjpro
2,476 Top Contributor
Hi this is the exception i am getting when i am trying to run this application:
Exception in thread "main" java.lang.NullP ointerException

thanks in advance..

package com.inventive.S tockMarketTradi ng;

import java.awt.Border Layout;
import java.awt.Dimens ion;
import java.awt.event. ActionEvent;
import java.awt.event. WindowAdapter;
import java.awt.event. WindowEvent;

import javax.swing.JFr ame;
import javax.swing.JPa nel;
import javax.swing.JSc rollPane;
import javax.swing.JTa ble;

/**
* @author inv
*
*/
public class TransactionsVie w extends JFrame{
private boolean DEBUG = true;

// Constructor Which takes care of the Components layout
public TransactionsVie w()
{
//super("JTableDe mo");
TransactionsMod el model = new TransactionsMod el();
TransactionsTab leSorter sorter = new TransactionsTab leSorter(model) ;
JTable table = new JTable(model);
sorter.addMouse ListenerToTable (table);
table.setPrefer redScrollableVi ewportSize(new Dimension(500, 70));
JScrollPane scrollPane = new JScrollPane(tab le);
getContentPane( ).add(scrollPan e, BorderLayout.CE NTER);

addWindowListen er(new WindowAdapter() {
public void windowClosing(W indowEvent e) {
System.exit(0);
}
});
}

public static void main(String[] args)
{
System.out.prin tln("inside main method");
TransactionsVie w view = new TransactionsVie w();
System.out.prin tln("after constructor call");
view.pack();
view.setVisible (true);
}

}
Welcome to TSDN

Please give me the full stack trace.

Debasis Jana
Dec 26 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
3012
by: Phillip Montgomery | last post by:
Hello all; I'm trying to debug an issue with a java script called, SelectSockets. It appears to be a fairly common one found on the web. I downloaded the SGI Java v1.4.1 installation from SGI's webpage and installed it using SGI's swmgr application. The installation was very straight forward and there were no errors when I installed the package. Then I ran /usr/java2/bin/javac SelectSockets.java to make the SelectSockets.class file.
1
9124
by: Andy Howells | last post by:
Can anybody help me on this? I am getting the below error but have not got a clue why. The file in my classpath eing used has the class that it says is not defined. Any ideas? I am running java version 1.4.0 and WMQ Series version 5.3 with CSD04. Exception in thread "main" java.lang.NoClassDefFoundError: com/ibm/mq/server/MQSESSION at com.ibm.mq.MQSESSIONServer.getMQSESSION(MQSESSIONServer.java:67) at...
18
2590
by: pradeep84 | last post by:
hi all, i'm using the following code and i'm getting exception in thread "main" java.lang.nullpointerexception at the line which is in bold. help me to solve this problem import java.applet.*; import java.awt.*; import java.io.*; import javax.swing.*; import java.sql.*;
9
3129
by: jith87 | last post by:
What is ths error.????? I m nw loading the JDBC driver for connection with MySql. Exception in thread "main" java.lang.NoClassDefFoundError: MySQLJDBCDriverTest
3
6445
by: Ananthu | last post by:
Hi This is my codings in order to access mysql database from java. Codings: import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.Statement;
9
3286
by: tiyaramunna | last post by:
I am trying to configure my system with Java program just to practice on the coding....when i compile a test.java program i am able to see the class file but i cant run the program ... I am getting the following error Exception in thread "main" java.lang.NoClassDefFoundError: test Caused by: java.lang.ClassNotFoundException: test at java.net.URLClassLoader$1.run(Unknown Source) at...
4
14733
by: jmitch89 | last post by:
I don't why I get this error: Exception in thread "main" java.lang.NoClassDefFoundError The statement below works just fine: java -cp "appframework-1.0.3.jar;swing-worker-1.1.jar";CurrentStrobe.jar com.visionpro.currentstrobe.CurrentStrobeApp However, the statement below produces the error: java -cp "appframework-1.0.3.jar;swing-worker-1.1.jar" -jar CurrentStrobe.jar Exception in thread "main"...
3
7661
by: ohadr | last post by:
hi, i get Exception in thread "main" java.lang.NullPointerException when i run my application. the exact error is: "Exception in thread "main" java.lang.NullPointerException at sortmergejoin.MergeJoin.Field(MergeJoin.java:204) at sortmergejoin.MergeJoin.SMJoin(MergeJoin.java:84) at sortmergejoin.MergeJoin.<init>(MergeJoin.java:34) at sortmergejoin.Main.main(Main.java:24) Java Result: 1"
1
6758
by: onlinegear | last post by:
HI i am writing this for college i know i have loads of combo boxes with nothing in the i havent got that far yet. but every time i run this is comes up with this erro run: Exception in thread "main" java.lang.NullPointerException at java.awt.Container.addImpl(Container.java:1041) at java.awt.Container.add(Container.java:365) at orderingsystem.OrderingSystem.<init>(OrderingSystem.java:261) at...
0
9489
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10162
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10101
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7509
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5396
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5528
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4063
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3665
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2893
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.