S
Sascha Lauterbach
I'm working with NetBean V3.6. I've create a new project from a JFrame
template. On the JFrame I have put a JTree.
public class MindStream extends javax.swing.JFrame {
/** Creates new form MindStream */
public MindStream() {
initComponents();
}
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
private void initComponents() {
MyTree = new javax.swing.JTree();
addWindowListener(new java.awt.event.WindowAdapter() {
public void windowClosing(java.awt.event.WindowEvent evt) {
exitForm(evt);
}
});
getContentPane().add(MyTree, java.awt.BorderLayout.CENTER);
pack();
}
/** Exit the Application */
private void exitForm(java.awt.event.WindowEvent evt) {
System.exit(0);
}
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
new MindStream().show();
}
// Variables declaration - do not modify
private javax.swing.JTree MyTree;
// End of variables declaration
}
But now I will change the initComponents in the following source but the
editor let me not to change the code. The function initComponents an the
other functions has a light blue background. How can I edit the source?
private void initComponents() {
DefaultMutableTreeNode root;
root = new DefaultMutableTreeNode("Root");
MyTree = new javax.swing.JTree(root);
addWindowListener(new java.awt.event.WindowAdapter() {
public void windowClosing(java.awt.event.WindowEvent evt) {
exitForm(evt);
}
});
getContentPane().add(MyTree, java.awt.BorderLayout.CENTER);
pack();
}
Many Thanks
Sascha
template. On the JFrame I have put a JTree.
public class MindStream extends javax.swing.JFrame {
/** Creates new form MindStream */
public MindStream() {
initComponents();
}
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
private void initComponents() {
MyTree = new javax.swing.JTree();
addWindowListener(new java.awt.event.WindowAdapter() {
public void windowClosing(java.awt.event.WindowEvent evt) {
exitForm(evt);
}
});
getContentPane().add(MyTree, java.awt.BorderLayout.CENTER);
pack();
}
/** Exit the Application */
private void exitForm(java.awt.event.WindowEvent evt) {
System.exit(0);
}
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
new MindStream().show();
}
// Variables declaration - do not modify
private javax.swing.JTree MyTree;
// End of variables declaration
}
But now I will change the initComponents in the following source but the
editor let me not to change the code. The function initComponents an the
other functions has a light blue background. How can I edit the source?
private void initComponents() {
DefaultMutableTreeNode root;
root = new DefaultMutableTreeNode("Root");
MyTree = new javax.swing.JTree(root);
addWindowListener(new java.awt.event.WindowAdapter() {
public void windowClosing(java.awt.event.WindowEvent evt) {
exitForm(evt);
}
});
getContentPane().add(MyTree, java.awt.BorderLayout.CENTER);
pack();
}
Many Thanks
Sascha