W
Wes Harrison
This is my first attempt at a form using the form designer in NetBeans but
it doesn't work properly and I can't figure out why. The question is, why
can't I resize with jSplitPane2 like I can with jSplitPane1? The divider
bar is frozen in one spot.
Thanks,
Wes
public class NewJFrame extends javax.swing.JFrame {
/** Creates new form NewJFrame */
public NewJFrame() {
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() {
jSplitPane2 = new javax.swing.JSplitPane();
jPanel2 = new javax.swing.JPanel();
jTabbedPane2 = new javax.swing.JTabbedPane();
jButton1 = new javax.swing.JButton();
jPanel1 = new javax.swing.JPanel();
jSplitPane1 = new javax.swing.JSplitPane();
jEditorPane1 = new javax.swing.JEditorPane();
jTabbedPane1 = new javax.swing.JTabbedPane();
jButton2 = new javax.swing.JButton();
jComboBox1 = new javax.swing.JComboBox();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
jSplitPane2.setAutoscrolls(true);
jSplitPane2.setContinuousLayout(true);
jPanel2.setLayout(new java.awt.BorderLayout());
jButton1.setText("jButton1");
jTabbedPane2.addTab("tab1", jButton1);
jPanel2.add(jTabbedPane2, java.awt.BorderLayout.CENTER);
jSplitPane2.setLeftComponent(jPanel2);
jPanel1.setLayout(new java.awt.BorderLayout());
jSplitPane1.setBorder(null);
jSplitPane1.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT);
jSplitPane1.setAutoscrolls(true);
jSplitPane1.setContinuousLayout(true);
jSplitPane1.setLeftComponent(jEditorPane1);
jButton2.setText("jButton2");
jTabbedPane1.addTab("tab1", jButton2);
jTabbedPane1.addTab("tab2", jComboBox1);
jSplitPane1.setBottomComponent(jTabbedPane1);
jPanel1.add(jSplitPane1, java.awt.BorderLayout.CENTER);
jSplitPane2.setRightComponent(jPanel1);
getContentPane().add(jSplitPane2, java.awt.BorderLayout.CENTER);
pack();
}
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new NewJFrame().setVisible(true);
}
});
}
// Variables declaration - do not modify
private javax.swing.JButton jButton1;
private javax.swing.JButton jButton2;
private javax.swing.JComboBox jComboBox1;
private javax.swing.JEditorPane jEditorPane1;
private javax.swing.JPanel jPanel1;
private javax.swing.JPanel jPanel2;
private javax.swing.JSplitPane jSplitPane1;
private javax.swing.JSplitPane jSplitPane2;
private javax.swing.JTabbedPane jTabbedPane1;
private javax.swing.JTabbedPane jTabbedPane2;
// End of variables declaration
}
it doesn't work properly and I can't figure out why. The question is, why
can't I resize with jSplitPane2 like I can with jSplitPane1? The divider
bar is frozen in one spot.
Thanks,
Wes
public class NewJFrame extends javax.swing.JFrame {
/** Creates new form NewJFrame */
public NewJFrame() {
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() {
jSplitPane2 = new javax.swing.JSplitPane();
jPanel2 = new javax.swing.JPanel();
jTabbedPane2 = new javax.swing.JTabbedPane();
jButton1 = new javax.swing.JButton();
jPanel1 = new javax.swing.JPanel();
jSplitPane1 = new javax.swing.JSplitPane();
jEditorPane1 = new javax.swing.JEditorPane();
jTabbedPane1 = new javax.swing.JTabbedPane();
jButton2 = new javax.swing.JButton();
jComboBox1 = new javax.swing.JComboBox();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
jSplitPane2.setAutoscrolls(true);
jSplitPane2.setContinuousLayout(true);
jPanel2.setLayout(new java.awt.BorderLayout());
jButton1.setText("jButton1");
jTabbedPane2.addTab("tab1", jButton1);
jPanel2.add(jTabbedPane2, java.awt.BorderLayout.CENTER);
jSplitPane2.setLeftComponent(jPanel2);
jPanel1.setLayout(new java.awt.BorderLayout());
jSplitPane1.setBorder(null);
jSplitPane1.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT);
jSplitPane1.setAutoscrolls(true);
jSplitPane1.setContinuousLayout(true);
jSplitPane1.setLeftComponent(jEditorPane1);
jButton2.setText("jButton2");
jTabbedPane1.addTab("tab1", jButton2);
jTabbedPane1.addTab("tab2", jComboBox1);
jSplitPane1.setBottomComponent(jTabbedPane1);
jPanel1.add(jSplitPane1, java.awt.BorderLayout.CENTER);
jSplitPane2.setRightComponent(jPanel1);
getContentPane().add(jSplitPane2, java.awt.BorderLayout.CENTER);
pack();
}
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new NewJFrame().setVisible(true);
}
});
}
// Variables declaration - do not modify
private javax.swing.JButton jButton1;
private javax.swing.JButton jButton2;
private javax.swing.JComboBox jComboBox1;
private javax.swing.JEditorPane jEditorPane1;
private javax.swing.JPanel jPanel1;
private javax.swing.JPanel jPanel2;
private javax.swing.JSplitPane jSplitPane1;
private javax.swing.JSplitPane jSplitPane2;
private javax.swing.JTabbedPane jTabbedPane1;
private javax.swing.JTabbedPane jTabbedPane2;
// End of variables declaration
}