I have 2 routers. An Asus RT-N65U and a D-link dir-605L. I know the dir-605L is WDS capable. But can I make it a repeater of the Asus router? Or will dlink routers only serve as repeaters to other D-link primary routers?

Got it.. the table with the most data should always be befreo the table with the least data and it should always be the right combination of Right and left joins. In my case, the order was
table2
right join
table1(and its conditions, this column has the most data)
left join
table1(and its conditions, this column has less data than the previous one)

If I have a table like this: Table1
ID - sequence - value
1     1         6        
1     2         4           
2     1         3       
2     2         2        
3     2         6        
4     1         5    
5...

Table2:
ID - Firstname
1     Jack
2     John
3     Mark
4     Mary

Querry Result I hope for:
ID - Firstname -  seq1value - seq2value
1       Jack            6           4
2       John            3           2
3       Mark            NULL        2
4       Mary            5           NULL 
5

the statement I have is:

select Table2.ID,Table2.Firstname, day1.seq1value,day2.seq2value from Table2,
(select Table2.ID,Table2.Firstname,Table1.value as seq1value from Table1,Table2
where Table1.ID=Table2.ID and Table1.sequence='1') day1,
(select Table2.ID,Table2.Firstname,Table1.value as seq1value from Table1,Table2
where Table1.ID=Table2.ID and Table1.sequence='2') day2 
where Table1.ID=day1.ID and Table2.ID=day2.ID group by Table2.ID;

This skips the records which have a null in them and presents the other records.
How do i get my query to look like the result I hope for?

THank you
Say I have 2 tables:
Table 1
Name - Toys - broken - recurrence
Jack    6      4        0 
John    8      3        1
Mark    8      2        2
Jack    4      2        1
John    3      3        1
Mark    6      0        2

Table 2:
Name  -  Toys  -   recurrence

COlumn Name: name
Column Toys: average of (Jack, John and Mark)'s toys (each a  different record).
Column recurrence: average of the 'broken' field when the recurrence is 1;

My main issue here is how to write a statement to insert data from table 1 
into table 2 with the correct calculations. I was assuming there would be 2
'Where' clauses needed.. but I am not too sure how to write the statement.

I know this will give me the averages in the Toys column per person:
insert into table2 (Toys, recurrence, name) select name,avg(Toys),recurrence from table1
group by name;

But how to I edit this statement so that it will also give me the recurrence column 
which has a different 'where' statement, as in where recurrence='1';
Say I have 2 tables:
Table 1
Name - Toys - broken
Jack    6      4
John    8      3
Mary    8      2
Nina    6      0

Table 2:
Name  -  ID
Mary     1
John     3
Jack     2
Nina     4

I need to merge Table 1 into table 2 and get the ID column to
match up with the persons name.
Notice the orders of both tables are different, and the only common field is the name

How do i do this?
Thank you.

Thank you very much.

Say I have a table like this
ID -- Val1 --- Val2
1     4        5
1     7        2
1     5        9
2     9        8
2     1        2
3     9        8
3     9        5
3     7        4
3     5        7
4     7        3
5     7        9
5     4        4

How do I get the averages of Val1 and Val2 per unit ID and store it into a new table? Notice that the number of rows per ID is different.

Eg new table:
ID -- Av_Val1 -- Av_Val2
1      5          5
2      5          5

and so on..

It works!!
Thank you so much...

so basically it was the "this" reference that made the class understand what to print instead of "OptionWindow.printAll(g);"

once again thank you so much

This is my code with some changes.. even though i dnt think they made a difference..
but part of my project is to learn something new... but i dnt understand this...

its still giving a exception in thread and nullpointer exception
[CODE]

import javax.swing.;
import java.awt.
;
import java.awt.print.PrinterJob;
import java.awt.Frame.;
import java.awt.event.
;
import java.io.;
import java.util.
;
import java.awt.Color;
import javax.swing.JFrame;
import javax.swing.JPanel;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.print.PageFormat;
import java.awt.print.Printable;
import java.awt.print.PrinterException;

public class OptionWindow extends JFrame implements ActionListener
{
private JLabel factoryprofitL,grossfactL,salesL,returninL,srtiL, openingstockL,purchL, retunoutL, carriageinL, closingstockL,costofgoodssoldL,grossprofitL,elecL,telephoneL,carriageoutwardL,waterL,expensetotalL,netproflossL;
private JLabel headingL,expensesheadingL;
private JTextField grossfactTF,factoryprofitTF,headingTF,salesTF,returninTF,srtiTF, openingstockTF,purchTF, retunoutTF, carriageinTF, closingstockTF,costofgoodssoldTF,grossprofitTF,elecTF,telephoneTF,carriageoutwardTF,waterTF,expensetotalTF,netproflossTF;

private CalculateButtonHandlerTpl cbtHandler;
private ExitButtonHandlerTpl ebtHandler;
private JButton exitTB, calculateTB;

private JButton printB;

private PrintButtonHandler pbHandler;

/**
private Component componentToPrint;
private double cHeight;

JFrame frameToPrint;
JTextArea text;
**/

private JFrame frameToPrint;

public OptionWindow()
{

        setTitle("Trading Profit and Loss Account");

        salesL=new JLabel("Sales: \n",SwingConstants.RIGHT);
        returninL=new JLabel("Return Inwards: \n",SwingConstants.RIGHT);
        headingL=new JLabel("Cost of Goods Sold\n\n",SwingConstants.RIGHT);
        openingstockL=new JLabel("Opening Stock: \n",SwingConstants.RIGHT);
        factoryprofitL=new JLabel("Factory Profit/Loss: \n",SwingConstants.RIGHT);
        retunoutL=new JLabel("Return Outwards: \n",SwingConstants.RIGHT);
        carriageinL=new JLabel("Carriage Inwards: \n",SwingConstants.RIGHT);
        closingstockL=new JLabel("Closing Stock: \n",SwingConstants.RIGHT);

        grossprofitL=new JLabel("Gross Profit/Loss: \n",SwingConstants.RIGHT);
        expensesheadingL=new JLabel("Expenses\n",SwingConstants.RIGHT);
        elecL=new JLabel("Electricity: \n",SwingConstants.RIGHT);
        telephoneL=new JLabel("Telephone: \n",SwingConstants.RIGHT);
        carriageoutwardL=new JLabel("Carriage outwards: ",SwingConstants.RIGHT);
        waterL=new JLabel("Water: \n",SwingConstants.RIGHT);
        expensetotalL=new JLabel("Total expenses:\n",SwingConstants.RIGHT);
        netproflossL=new JLabel("Net Profit/Loss: \n",SwingConstants.RIGHT);

salesTF=new JTextField(10);
returninTF=new JTextField(10);
srtiTF=new JTextField(10);
//headingTF=new JTextField(10);
openingstockTF=new JTextField(10);
factoryprofitTF=new JTextField(10);
retunoutTF=new JTextField(10);
carriageinTF=new JTextField(10);
closingstockTF=new JTextField(10);
costofgoodssoldTF=new JTextField(10);
grossprofitTF=new JTextField(10);

elecTF=new JTextField(10);
telephoneTF=new JTextField(10);
carriageoutwardTF=new JTextField(10);
waterTF=new JTextField(10);
expensetotalTF=new JTextField(10);
netproflossTF=new JTextField(10);

    calculateTB=new JButton("Calculate");
    cbtHandler=new CalculateButtonHandlerTpl();
    calculateTB.addActionListener(cbtHandler);

    exitTB=new JButton("Exit");
    ebtHandler=new ExitButtonHandlerTpl();
    exitTB.addActionListener(ebtHandler);

printB=new JButton("Print");
pbHandler=new PrintButtonHandler();
printB.addActionListener(pbHandler);

    setTitle("Trading profit and loss account");

    Container pane=getContentPane(); ...

and how do i use the "this" reference in this context?

totally confused...

at line 28 i added
[CODE]private JFrame frameToPrint;[/CODE]

and at line 346 i added
[CODE]frameToPrint.printAll(g);[/CODE]

But when i press the print button now it gives an exception in thread

Still gives an error... cannot find variable frame...

oh i see it nvm... but what do i enter into that method to get it to print the GUI?

I dint understand

Its between line 338 and 366..
I feel like there has to be another statement to print all the visible..

Thanx for Helping me Everyone..

When I press the print Button, all it prints is a blank page.
This is my code:
[CODE]
import javax.swing.;
import java.awt.
;
import java.awt.event.;
import java.io.
;
import java.util.*;
import java.awt.Color;
import javax.swing.JFrame;
import javax.swing.JPanel;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.print.PageFormat;
import java.awt.print.Printable;
import java.awt.print.PrinterException;
import java.awt.print.PrinterJob;

public class OptionWindow extends JFrame implements ActionListener
{

private JLabel factoryprofitL,grossfactL,salesL,returninL,srtiL, openingstockL,purchL, retunoutL, carriageinL, closingstockL,costofgoodssoldL,grossprofitL,elecL,telephoneL,carriageoutwardL,waterL,expensetotalL,netproflossL;
private JLabel headingL,expensesheadingL;
private JTextField grossfactTF,factoryprofitTF,headingTF,salesTF,returninTF,srtiTF, openingstockTF,purchTF, retunoutTF, carriageinTF, closingstockTF,costofgoodssoldTF,grossprofitTF,elecTF,telephoneTF,carriageoutwardTF,waterTF,expensetotalTF,netproflossTF;

private CalculateButtonHandlerTpl cbtHandler;
private ExitButtonHandlerTpl ebtHandler;
private JButton exitTB, calculateTB;

private JButton printB;

private PrintButtonHandler pbHandler;
public OptionWindow()
{
setTitle("Trading Profit and Loss Account");
salesL=new JLabel("Sales: \n",SwingConstants.RIGHT);
returninL=new JLabel("Return Inwards: \n",SwingConstants.RIGHT);
headingL=new JLabel("Cost of Goods Sold\n\n",SwingConstants.RIGHT);
openingstockL=new JLabel("Opening Stock: \n",SwingConstants.RIGHT);
factoryprofitL=new JLabel("Factory Profit/Loss: \n",SwingConstants.RIGHT);
retunoutL=new JLabel("Return Outwards: \n",SwingConstants.RIGHT);
carriageinL=new JLabel("Carriage Inwards: \n",SwingConstants.RIGHT);
closingstockL=new JLabel("Closing Stock: \n",SwingConstants.RIGHT);

        grossprofitL=new JLabel("Gross Profit/Loss: \n",SwingConstants.RIGHT);
        expensesheadingL=new JLabel("Expenses\n",SwingConstants.RIGHT);
        elecL=new JLabel("Electricity: \n",SwingConstants.RIGHT);
        telephoneL=new JLabel("Telephone: \n",SwingConstants.RIGHT);
        carriageoutwardL=new JLabel("Carriage outwards: ",SwingConstants.RIGHT);
        waterL=new JLabel("Water: \n",SwingConstants.RIGHT);
        expensetotalL=new JLabel("Total expenses:\n",SwingConstants.RIGHT);
        netproflossL=new JLabel("Net Profit/Loss: \n",SwingConstants.RIGHT);

salesTF=new JTextField(10);
returninTF=new JTextField(10);
srtiTF=new JTextField(10);
//headingTF=new JTextField(10);
openingstockTF=new JTextField(10);
factoryprofitTF=new JTextField(10);
retunoutTF=new JTextField(10);
carriageinTF=new JTextField(10);
closingstockTF=new JTextField(10);
costofgoodssoldTF=new JTextField(10);
grossprofitTF=new JTextField(10);

elecTF=new JTextField(10);
telephoneTF=new JTextField(10);
carriageoutwardTF=new JTextField(10);
waterTF=new JTextField(10);
expensetotalTF=new JTextField(10);
netproflossTF=new JTextField(10);

    calculateTB=new JButton("Calculate");
    cbtHandler=new CalculateButtonHandlerTpl();
    calculateTB.addActionListener(cbtHandler);

    exitTB=new JButton("Exit");
    ebtHandler=new ExitButtonHandlerTpl();
    exitTB.addActionListener(ebtHandler);

printB=new JButton("Print");
pbHandler=new PrintButtonHandler();
printB.addActionListener(pbHandler);

    setTitle("Trading profit and loss account");

    Container pane=getContentPane();
    Container con=this.getContentPane();
    con.setBackground(Color.white);

    //pane.setLayout(new GridLayout(28,1));

con.setLayout(null);
con.setLayout(null );

    pane.add(salesL);
    pane.add(salesTF);
    salesL.setLocation(1,2);
    salesL.setSize(190,25);
    add(salesL);
    salesTF.setLocation(420,2);
    salesTF.setSize(150,25);
    add(salesTF);
    pane.add(returninL);
    pane.add(returninTF);
    returninL.setLocation(1,30);
    returninL.setSize(190,30);
    add(returninL);
    returninTF.setLocation(420,30);
    returninTF.setSize(150,25);
    add(returninTF);

    pane.add(srtiTF);
    srtiTF.setLocation(420,58);
    srtiTF.setSize(150,25);
    add(srtiTF);
    srtiTF.setBorder(BorderFactory.createLoweredBevelBorder());
srtiTF.setEditable(false);

    //pane.add(headingTF);
    pane.add(headingL);
    headingL.setLocation(1,86);
    headingL.setSize(150,30);
    add(headingL);

    pane.add(openingstockL);
    pane.add(openingstockTF);
    openingstockL.setLocation(1,114);
    openingstockL.setSize(190,30);
    add(openingstockL);
    openingstockTF.setLocation(250,114); ...

lol nvm i got it... what i meant was that a text field that only outputs calculated values. but prevents anything from being typed in that field. It was basically this:

[CODE] expensetotalTF.setBorder(BorderFactory.createLoweredBevelBorder());
expensetotalTF.setEditable(false);[/CODE]

Thanks James.. oh yeah is there a way of making a text field only display output? because when you leave the text field blank, it gives an error message, there has to be a zero in it. so i was wondering if the text field could be output only..

I had forgotten to add all the JTextfields in OptionWindow.. Thanks for pointing that out..
But this part of the program still gives the message "java uses or overrides a deprecated API."

[CODE]import java.io.;
import java.util.
;
import javax.swing.JOptionPane;
import javax.swing.;
import java.awt.
;
import java.awt.event.*;

public class ISUmessdup extends JFrame
{

private static final int WIDTH=800;
private static final int HEIGHT=600;
private JLabel salesL,returninL,srtiL, openingstockL,purchL, retunoutL, headingL,carriageinL, closingstockL,costofgoodssoldL,grossprofitL,elecL,telephoneL,carriageoutwardL,waterL,expensetotalL,netproflossL;
private JLabel directmaterialsL, openingL,ospL, purchasesL, closingL, directlabL,patentfeeL,primecostL,indirectwageL,heatnlightL,insuranceL,genexpenseL,depreciationL,exptotL,pcexptotL,openingwrkL,closingwrkL,gproducedL,factprofL,tplL,totworkinprogL;
private JTextField directmaterialsTF, openingTF,exptotTF, purchasesTF,ospTF, closingTF,pcexptotTF, directlabTF,totworkinprogTF,patentfeeTF,indirectwageTF,heatnlightTF,insuranceTF,genexpenseTF,depreciationTF,openingwrkTF,closingwrkTF,totwrkinprogTF,gproducedTF,factprofTF,tplTF,primecostTF;

private JButton calculateB, exitB,tplB;
private CalculateButtonHandler cbHandler;
private ExitButtonHandler ebHandler;
private TradingAccountHandler tbHandler;

public ISUmessdup()
{

openingL=new JLabel("Opening Stock: \n",SwingConstants.RIGHT);
purchasesL=new JLabel("Purchases: \n",SwingConstants.RIGHT);
ospL=new JLabel("---\n",SwingConstants.RIGHT);
closingL=new JLabel("Closing Stock: \n",SwingConstants.RIGHT);
directmaterialsL=new JLabel("---\n",SwingConstants.RIGHT);
directlabL=new JLabel("Direct Labour: \n",SwingConstants.RIGHT);
patentfeeL=new JLabel("Patent Fees: \n",SwingConstants.RIGHT);
primecostL=new JLabel("Prime Cost: \n",SwingConstants.RIGHT);
indirectwageL=new JLabel("Indirect Wages: \n",SwingConstants.RIGHT);
heatnlightL=new JLabel("Heating & Lighting: \n",SwingConstants.RIGHT);
insuranceL=new JLabel("Insurance: \n",SwingConstants.RIGHT);
genexpenseL=new JLabel("General Expenses: \n",SwingConstants.RIGHT);
depreciationL=new JLabel("Depreciation: ",SwingConstants.RIGHT);
exptotL=new JLabel("TOTAL EXPENSES: \n",SwingConstants.RIGHT);
pcexptotL=new JLabel("PCEXPTOT\n",SwingConstants.RIGHT);
openingwrkL=new JLabel("Opeining Work in Progress: \n",SwingConstants.RIGHT);
closingwrkL=new JLabel("Closing Work In Progress: ",SwingConstants.RIGHT);
totworkinprogL=new JLabel("TOTAL WORK IN PROGRESS\n",SwingConstants.RIGHT);
gproducedL=new JLabel("Factory Cost Of Goods Produced: \n",SwingConstants.RIGHT);
factprofL=new JLabel("Factory Profit (10 %): \n",SwingConstants.RIGHT);
tplL=new JLabel("Transferred to T P & L: \n",SwingConstants.RIGHT);

//WdirectmaterialsTF, WopeningTF,exptotTF, WpurchasesTF,WospTF, WclosingTF,WpcexptotTF, WdirectlabTF,WtotworkinprogTF,WpatentfeeTF,WindirectwageTF,WheatnlightTF,WinsuranceTF,WgenexpenseTF,WdepreciationTF,WopeningwrkTF,WclosingwrkTF,totwrkinprogTF,gproducedTF,WfactprofTF,WtplTF,WprimecostTF;
openingTF=new JTextField(10);
purchasesTF=new JTextField(10);
ospTF=new JTextField(10);
closingTF=new JTextField(10);
directmaterialsTF=new JTextField(10);
directlabTF=new JTextField(10);
patentfeeTF=new JTextField(10);
primecostTF=new JTextField(10);
indirectwageTF=new JTextField(10);
heatnlightTF=new JTextField(10);
insuranceTF=new JTextField(10);
genexpenseTF=new JTextField(10);
depreciationTF=new JTextField(10);
exptotTF=new JTextField(10);
pcexptotTF=new JTextField(10);
openingwrkTF=new JTextField(10);
closingwrkTF=new JTextField(10);
totworkinprogTF=new JTextField(10);
gproducedTF=new JTextField(10);
factprofTF=new JTextField(10);
tplTF=new JTextField(10);

calculateB=new JButton("Calculate");
cbHandler=new CalculateButtonHandler();
calculateB.addActionListener(cbHandler);

tplB=new JButton("Goto Trading Account");
tbHandler=new TradingAccountHandler();
tplB.addActionListener(tbHandler);

exitB=new JButton("Exit");
ebHandler=new ExitButtonHandler(); ...

This is the class that is called- When i run this it gives me the errors mentioned in my first post
[CODE]import java.awt.;
import java.lang.
;
import java.awt.event.;
import javax.swing.
;

public class OptionWindow extends JFrame implements ActionListener
{

private JLabel salesL,returninL,srtiL, openingstockL,purchL, retunoutL, headingL,carriageinL, closingstockL,costofgoodssoldL,grossprofitL,elecL,telephoneL,carriageoutwardL,waterL,expensetotalL,netproflossL;
private JTextField salesTF,returninTF,srtiTF, openingstockTF,purchTF, retunoutTF, carriageinTF, closingstockTF,costofgoodssoldTF,grossprofitTF,elecTF,telephoneTF,carriageoutwardTF,waterTF,expensetotalTF,netproflossTF;
private CalculateButtonHandlerTpl cbtHandler;
private ExitButtonHandlerTpl ebtHandler;
private JButton exitTB, calculateTB;

public OptionWindow()
{

        setTitle("Trading Profit and Loss Account");

        salesL=new JLabel("Sales: \n",SwingConstants.RIGHT);
        returninL=new JLabel("Return Inwards: \n",SwingConstants.RIGHT);
        srtiL=new JLabel("---\n",SwingConstants.RIGHT);
        headingL=new JLabel("Cost of Goods Sold",SwingConstants.CENTER);
        openingstockL=new JLabel("Opening Stock: \n",SwingConstants.RIGHT);
        purchL=new JLabel("Purchases\n",SwingConstants.RIGHT);
        retunoutL=new JLabel("Return Outwards: \n",SwingConstants.RIGHT);
        carriageinL=new JLabel("Carriage Inwards: \n",SwingConstants.RIGHT);
        closingstockL=new JLabel("Closing Stock: \n",SwingConstants.RIGHT);
        costofgoodssoldL=new JLabel("---: \n",SwingConstants.RIGHT);
        grossprofitL=new JLabel("Gross Profit/Loss: \n",SwingConstants.RIGHT);
        elecL=new JLabel("Electricity: \n",SwingConstants.RIGHT);
        telephoneL=new JLabel("Telephone: \n",SwingConstants.RIGHT);
        carriageoutwardL=new JLabel("Carriage outwards: ",SwingConstants.RIGHT);
        waterL=new JLabel("Water: \n",SwingConstants.RIGHT);
        expensetotalL=new JLabel("TOTAL EXPENSES\n",SwingConstants.RIGHT);
        netproflossL=new JLabel("Net Profit/Loss: \n",SwingConstants.RIGHT);

    calculateTB=new JButton("Calculate");
    cbtHandler=new CalculateButtonHandlerTpl();
    calculateTB.addActionListener(cbtHandler);

    exitTB=new JButton("Exit");
    ebtHandler=new ExitButtonHandlerTpl();
    exitTB.addActionListener(ebtHandler);

    setTitle("Trading profit and loss account");

    Container pane=getContentPane();
    pane.setLayout(new GridLayout(28,1));

    pane.add(salesL);
    pane.add(salesTF);
    pane.add(returninL);
    pane.add(returninTF);
    pane.add(srtiL);
    pane.add(srtiTF);
    pane.add(headingL);

    pane.add(openingstockL);
    pane.add(openingstockTF);
    pane.add(purchL);
    pane.add(purchTF);
    pane.add(retunoutL);
    pane.add(retunoutTF);
    pane.add(carriageinL);
    pane.add(carriageinTF);
    pane.add(closingstockL);
    pane.add(closingstockTF);
    pane.add(costofgoodssoldL);
    pane.add(costofgoodssoldTF);
    pane.add(grossprofitL);
    pane.add(grossprofitTF);
    pane.add(elecL);
    pane.add(elecTF);
    pane.add(telephoneL);
    pane.add(telephoneTF);
    pane.add(carriageoutwardL);
    pane.add(carriageoutwardTF);
    pane.add(waterL);
    pane.add(waterTF);
    pane.add(expensetotalL);
    pane.add(expensetotalTF);
    pane.add(netproflossL);
    pane.add(netproflossTF);
    pane.add(calculateTB);
    pane.add(exitTB);

    setSize(WIDTH,HEIGHT);
    setVisible(true);
    setDefaultCloseOperation(EXIT_ON_CLOSE);
    }

    private class CalculateButtonHandlerTpl implements ActionListener
    {
        public void actionPerformed(ActionEvent e)
    {
        double sales=0.0;
        double o_stock=0.0;
        double p_s=0.0;
        double c_i=0.0;
        double c_stock=0.0;
        double r_o=0.0;
        double r_i=0.0;
        double cgs=0.0;
        double srti=0.0;
        double g_p=0.0;

        double c_o=0.0;
        double n_p=0.0;
        double exp=0.0;
        double electricity=0.0;
        double telephone=0.0;
        double carriageout=0.0;
        double water=0.0;

    sales=Double.parseDouble(salesTF.getText());
    r_i=Double.parseDouble(returninTF.getText());
    o_stock=Double.parseDouble(openingstockTF.getText());
    p_s=Double.parseDouble(purchTF.getText());
    r_o=Double.parseDouble(retunoutTF.getText());
    c_i=Double.parseDouble(carriageinTF.getText());
    c_stock=Double.parseDouble(closingstockTF.getText());
    electricity=Double.parseDouble(elecTF.getText());
    telephone=Double.parseDouble(telephoneTF.getText());
    carriageout=Double.parseDouble(carriageoutwardTF.getText());
    water=Double.parseDouble(waterTF.getText());

    srti=sales-r_i;
    cgs=o_stock+p_s-r_o+c_i-c_stock;
    g_p=srti-cgs;
    exp=telephone+electricity+c_o+water;
    n_p=g_p-exp;

    srtiTF.setText(" "+srti);
    costofgoodssoldTF.setText(" ...

This is the first class of my code
[CODE]
/*
Teacher Ref-ICS3USept.2010
ICS3U Computer Programming
September 2010
Java Template: Save as Template.java
Program description: This is a template you will be using every time you create a new java application!
**/

import java.io.;
import java.util.
;
import javax.swing.JOptionPane;
import javax.swing.;
import java.awt.
;
import java.awt.event.*;

public class ISUmessdup extends JFrame
{

private static final int WIDTH=800;
private static final int HEIGHT=600;
private JLabel salesL,returninL,srtiL, openingstockL,purchL, retunoutL, headingL,carriageinL, closingstockL,costofgoodssoldL,grossprofitL,elecL,telephoneL,carriageoutwardL,waterL,expensetotalL,netproflossL;
private JLabel directmaterialsL, openingL,ospL, purchasesL, closingL, directlabL,patentfeeL,primecostL,indirectwageL,heatnlightL,insuranceL,genexpenseL,depreciationL,exptotL,pcexptotL,openingwrkL,closingwrkL,totwrkinprogL,gproducedL,factprofL,tplL,totworkinprogL;
private JTextField directmaterialsTF, openingTF,exptotTF, purchasesTF,ospTF, closingTF,pcexptotTF, directlabTF,totworkinprogTF,patentfeeTF,indirectwageTF,heatnlightTF,insuranceTF,genexpenseTF,depreciationTF,openingwrkTF,closingwrkTF,totwrkinprogTF,gproducedTF,factprofTF,tplTF,primecostTF;
private JTextField salesTF,returninTF,srtiTF, openingstockTF,purchTF, retunoutTF, carriageinTF, closingstockTF,costofgoodssoldTF,grossprofitTF,elecTF,telephoneTF,carriageoutwardTF,waterTF,expensetotalTF,netproflossTF;
private JButton calculateB, exitB,tplB;
private CalculateButtonHandler cbHandler;
private ExitButtonHandler ebHandler;
private TradingAccountHandler tbHandler;

public ISUmessdup()
{

openingL=new JLabel("Opening Stock: \n",SwingConstants.RIGHT);
purchasesL=new JLabel("Purchases: \n",SwingConstants.RIGHT);
ospL=new JLabel("---\n",SwingConstants.RIGHT);
closingL=new JLabel("Closing Stock: \n",SwingConstants.RIGHT);
directmaterialsL=new JLabel("---\n",SwingConstants.RIGHT);
directlabL=new JLabel("Direct Labour: \n",SwingConstants.RIGHT);
patentfeeL=new JLabel("Patent Fees: \n",SwingConstants.RIGHT);
primecostL=new JLabel("Prime Cost: \n",SwingConstants.RIGHT);
indirectwageL=new JLabel("Indirect Wages: \n",SwingConstants.RIGHT);
heatnlightL=new JLabel("Heating & Lighting: \n",SwingConstants.RIGHT);
insuranceL=new JLabel("Insurance: \n",SwingConstants.RIGHT);
genexpenseL=new JLabel("General Expenses: \n",SwingConstants.RIGHT);
depreciationL=new JLabel("Depreciation: ",SwingConstants.RIGHT);
exptotL=new JLabel("TOTAL EXPENSES: \n",SwingConstants.RIGHT);
pcexptotL=new JLabel("PCEXPTOT\n",SwingConstants.RIGHT);
openingwrkL=new JLabel("Opeining Work in Progress: \n",SwingConstants.RIGHT);
closingwrkL=new JLabel("Closing Work In Progress: ",SwingConstants.RIGHT);
totworkinprogL=new JLabel("TOTAL WORK IN PROGRESS\n",SwingConstants.RIGHT);
gproducedL=new JLabel("Factory Cost Of Goods Produced: \n",SwingConstants.RIGHT);
factprofL=new JLabel("Factory Profit (10 %): \n",SwingConstants.RIGHT);
tplL=new JLabel("Transferred to T P & L: \n",SwingConstants.RIGHT);

openingTF=new JTextField(10);
purchasesTF=new JTextField(10);
ospTF=new JTextField(10);
closingTF=new JTextField(10);
directmaterialsTF=new JTextField(10);
directlabTF=new JTextField(10);
patentfeeTF=new JTextField(10);
primecostTF=new JTextField(10);
indirectwageTF=new JTextField(10);
heatnlightTF=new JTextField(10);
insuranceTF=new JTextField(10);
genexpenseTF=new JTextField(10);
depreciationTF=new JTextField(10);
exptotTF=new JTextField(10);
pcexptotTF=new JTextField(10);
openingwrkTF=new JTextField(10);
closingwrkTF=new JTextField(10);
totworkinprogTF=new JTextField(10);
gproducedTF=new JTextField(10);
factprofTF=new JTextField(10);
tplTF=new JTextField(10);

calculateB=new JButton("Calculate");
cbHandler=new CalculateButtonHandler();
calculateB.addActionListener(cbHandler); ...

What do these errors mean?
im new to java..

Exception in thread "main" java.lang.NullPointerException
at java.awt.Container.addImpl<Container.java:1041>
at java.awt.Container.add<Container.java:365>
at OptionWindow.<init><OptionWindow.java:63>
at OptionWindow.main<OptionWindow.java:182>

please help