关于布局管理器的问题?
关于布局管理器?
我这个布局管理器要随之最大化按钮,我的里面的树,呀等要随着增大
具体代码如下:
、、----------------------
package com.boco.cockpit.test1;
import java.awt.*;
import java.awt.event.*;
import java.applet.*;
import javax.swing.*;
import javax.swing.border.*;
import com.borland.jbcl.layout.*;
public class test extends Applet {
boolean isStandalone = false;
JPanel jPanel1 = new JPanel();
BorderLayout borderLayout1 = new BorderLayout();
JPanel jPanel11 = new JPanel();
BorderLayout borderLayout2 = new BorderLayout();
TitledBorder titledBorder1;
JScrollPane jScrollPane1 = new JScrollPane();
JTree jTree1 = new JTree();
GridLayout gridLayout1 = new GridLayout();
/**Get a parameter value*/
public String getParameter(String key, String def) {
return isStandalone ? System.getProperty(key, def) :
(getParameter(key) != null ? getParameter(key) : def);
}
/**Construct the applet*/
public test() {
}
/**Initialize the applet*/
public void init() {
try {
jbInit();
}
catch(Exception e) {
e.printStackTrace();
}
}
/**Component initialization*/
private void jbInit() throws Exception {
//titledBorder1 = new TitledBorder("");
titledBorder1 = new TitledBorder(BorderFactory.createEtchedBorder(Color.white,new Color(148, 145, 140)),"第一棵树");
this.setLayout(gridLayout1);
jPanel1.setLayout(borderLayout1);
jPanel11.setLayout(borderLayout2);
jPanel11.setBorder(titledBorder1);
this.setEnabled(true);
this.add(jPanel1, null);
jPanel1.add(jPanel11, BorderLayout.CENTER);
jPanel11.add(jScrollPane1, BorderLayout.CENTER);
jScrollPane1.getViewport().add(jTree1, null);
}
/**Start the applet*/
public void start() {
}
/**Stop the applet*/
public void stop() {
}
/**Destroy the applet*/
public void destroy() {
}
/**Get Applet information*/
public String getAppletInfo() {
return "Applet Information";
}
/**Get parameter info*/
public String[][] getParameterInfo() {
return null;
}
}