well, i started generating my code through Textpad, and when i run it, it runs smoothly, but if i am to create the jar file through Netbeans, it becomes a disaster and returns a null error. i cant even figure out where the error is...
here is the part of the code
Container c = getContentPane();
public PnTDesktop(final Connection con,final String userOnline)
{
final String[] args = new String[10];
setTitle("The user Online is "+userOnline);
Panel adminPanel = new Panel();
JButton logoutButton = new JButton("Logout");
adminPanel.setLayout(new BorderLayout());
adminPanel.add(logoutButton,BorderLayout.CENTER);
logoutButton.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent ae)
{
hide();
PnTLogin goToLogin = new PnTLogin();
}
});
Panel downloadPanel = new Panel();
JButton mp3UploadButton = new JButton(mp3Icon);
downloadPanel.add(new JLabel("Download Selection"));
downloadPanel.add(mp3UploadButton);
mp3UploadButton.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent ae)
{
try
{
hide();
BasicUploader startUploader = new BasicUploader(con,userOnline,"MP3");
}catch(Exception myE)
{
ErrorFrame thisError = new ErrorFrame(myE,con,userOnline);
}
});
////////----------------------------------------------------///////////////
the class BasicUploader is as follows
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.sql.*;
public class BasicUploader extends JFrame
{
Container c = getContentPane();
public BasicUploader(final Connection con,final String userOnline,final String theUploadType)
{
final String[] args = new String[10];
setTitle("Upload either USB or Infrared "+ theUploadType);
Panel topPanel = new Panel();
JLabel myTopDefiner = new JLabel();
ImageIcon mybg = new ImageIcon(ClassLoader.getSystemResource(theUploadType+"Icon.jpg"));
myTopDefiner.setIcon(mybg);
topPanel.add(myTopDefiner);
Panel mainPanel = new Panel();
JButton usbUploadButton = new JButton("USB");
JButton externalUploadButton = new JButton("External");
mainPanel.add(new JLabel("Upload using either USB or External"));
mainPanel.add(usbUploadButton);
mainPanel.add(externalUploadButton);
Panel bottomPanel = new Panel();
JButton cancelButton = new JButton("Cancel");
bottomPanel.add(cancelButton);
c.setLayout(new BorderLayout());
c.add(topPanel,BorderLayout.NORTH);
c.add(mainPanel,BorderLayout.CENTER);
c.add(bottomPanel,BorderLayout.SOUTH);
usbUploadButton.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent ae)
{
String uploadMode ="usb";
hide();
}
});
externalUploadButton.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent ae)
{
String uploadMode ="external";
hide();
}
});
cancelButton.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent ae)
{
hide();
}
});
setSize(600,600);
setVisible(true);
}
}
///////////////////--------------------------------------/////////////////////////////
so any one with any help please its urgent