Hi
I use netbeans to write code, In my code I am trying to create a new instance of another class. When I try to do that the compiler gives me an error, I can not figure out what is the exact problem with the code. I have posted my code. The name of my class is conn.
Code:
public class cln extends javax.swing.JFrame {
JFileChooser fc;
Defaultlistmod listmod;
Connect conn;
public cln() {
initComponents();
fc = new JFileChooser();
fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
Connect conn = new Connect();
}
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new cln().setVisible(true);
}
});
}
}
Any advice or help on this.
Bookmarks