Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!

Swati krishnan

Greenhorn
+ Follow
since Feb 09, 2001
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Swati krishnan

Here is my code to implement the FlyTableModel extending Abstract table Model
It compiles fine but I get the error "NullPointer Exception at
getColumnCount()", getRowCount() and getColumnName(int col)
at Runtime. What could be the problem

class FlyTableModel extends AbstractTableModel()
{
Data fly;
public void setResult()
{
try
{
fly = new Data("db.db");
int recordCount;

recordCount = fly.getRecordCount();
...Here all the dataInfo and Vector conversion
...

}
catch (IOException e)
{
System.out.println(e.getMessage());

}
}


public int getColumnCount()
{
return fly.getFieldInfo().length;

}
public int getRowCount()
{
return fly.getRecordCount();

}
public Object getValueAt(int row, int col)
{
.....
}
public String getColumnName(int col)
{
......
}
}
guess I am in the same boat too proud SCJP and clueless SCJD . I downloaded the exam recently and stared working on it. It does not seem totally imposible but seems a little difficult. I think once I get done with the first screen I will be more confident. I thought that I would go back and do the BINGO application on the SUN site to feel more confident and then get back working on my assignment. Its going to take more time, but I am all set to do it
Krishnan
Recently I downloaded the SCJD and have started some work on it. Passed the SCJP in Dec 2000. I have three years of experience in Oracle and PowerBuilder but am having difficulty with the SCJD, since I have no real life Java experience. How do I go about preparing for it. I have looked at some of the tutorials on the sun site and that has helped some but not enormously, and lots of books. Any advise on what I should do to tackle the assignment. Should I get some work experience first, or is this doable with just academic knowledge of java. What typically are people's background/experience preparing for SCJD. Would like to know some.
thanks
Krishnan
Thanks david, seems like that was it
java suncertify.db.FbnModel
Thanks for bringing it to my attention
Krishnan
I tried fixing it by the following super("FbnModel");
and then made model and table global but still get the same error. Its phasing me out
Krishnan
public FbnModel()
{
super("FbnModel");
model = new FlyTableModel();
table = new JTable(model);
}
I packaged it under suncertify.db and have all the classpaths and directories set up as required to the best of my knowledge. But still I am getting the same error.
Also I am unable to find any error in the public FbnModel() code.
How can I get this code to run.
Thanks in advance
Krishnan
This may seem very basic to some of you. But since it is the first time I am new to Java I would like to know what could be done to fix my problem.
I am writing code to create JTable and it compiles fine but when I run it this is the error message:
Exception in thread "main" java.lang.NoClassDefFoundError:suncertify\db\FbnModel (wrong name suncertify/db/FbnModel)
Here are some snippets
public class FbnModel extends JFrame
{
...
public void FlyTableModel() throws IOException
{
.....
}
class FlyTableModel extends AbstractTableModel
{
}
public FbnModel()
{
FlyTableModel model = new FlyTableModel();
JTable table = new JTable(model);
}
public static void main(String[] args)
{
FbnModel frame = new FbnModel();
frame.pack();
frame.
}
}
Any hints would be appreciated
Krishnan

Thanks Lisa that seemed to fix it
Appreciate your help
Krishnan
The outline below creates the JTable and creates instance of Data class. However when I compile it I get an error as follows
Undefined variable or class name: fly
return fly.getFieldInfo.length();
^
Any hints on what I am doing wrong and how to fix it
Thanks
Krishnan

package suncertify.db;
import ..
..
public class FbnModel extends JFrame
{
public void FlyTableModel() throws IOException
{
try
{
Data fly = new Data("db.db");
}
catch (Exception ex)
{
System.out.println(ex.getMessage());
}
}
class FlyTableModel extends AbstractTableModel
{
...

public int getColumnCount()
{
return fly.getFieldInfo().length;
}
....
}
Anyone interested in forming a study group. I just downloaded the assignment 2 days ago. If you are interested please email me
at krishnan@attcanada.net
Thanks
Swati
Long story.
I have a bachelors from a reputed tech institute in India, followed by MBA in MIS is the US, with a 4.0 GPA in major. I worked for two years in Foxpro. Then about 2 years in Power Builder, Oracle and SQL Server. Always did well in my career and school and am a US citizen Anyway then took a break for a while, and now have two kids 3 and 1. Its been 1.5 years now since I worked though I thoroughly enjoy being with my kids. Meanwhile I became an SCJP and am working on the SCJD. Hope to complete it by middle of this year. I have no real life java experience plus have had a break in my career. Now I live in Canada.
I would like some advice on how I should merge back into the workplace.
I am not in the point of my life where I can give 100% of my time to my career too. I want a job that takes me 1 day into the workplace max and the other time I would like to work on my own time from home. I work well on my own schedule...burning the midnight oil and I am a very hard working committed person, be it at home or the workplace. Thats how I am working on SCJP and SCJD. But I want to keep in touch with the workplace, and money is not a big factor right now.
Any suggestions on how I go about finding this ideal job. I am open to contracting, working on small projects, anything. But time is my big constraint. I am willing to put in 40hrs a week but not at the workplace right now. Should I be looking at doing some independent work on the web myself before I look for a job? How do I go about deciding what to do. Though I can post my "ideal job" on the web how do I convince potential employers that this is what I want?. Any guidance would be very appreciated
Swati
19 years ago