先回答你的第一个问题:
import java.awt.*;
import javax.swing.*;public class test { /**
*
*/
public test() {
super();
// TODO Auto-generated constructor stub
} public static void main(String[] args) {
MyFrame i=new MyFrame();
}
}class MyFrame extends JFrame{
public MyFrame(){
super("Internal Frame");
Container contentPane=this.getContentPane();
contentPane.setLayout(new BorderLayout());
JDesktopPane desktopPane=new JDesktopPane();
contentPane.add(desktopPane);
JInternalFrame internalFrame=new JInternalFrame("xx",true,true,true,true);
desktopPane.add(internalFrame);
try{
internalFrame.setMaximum(true);
}catch(java.beans.PropertyVetoException e){
System.exit(0);
}
internalFrame.setVisible(true);
setSize(350,350);
show();
}
}
import java.awt.*;
import javax.swing.*;public class test { /**
*
*/
public test() {
super();
// TODO Auto-generated constructor stub
} public static void main(String[] args) {
MyFrame i=new MyFrame();
}
}class MyFrame extends JFrame{
public MyFrame(){
super("Internal Frame");
Container contentPane=this.getContentPane();
contentPane.setLayout(new BorderLayout());
JDesktopPane desktopPane=new JDesktopPane();
contentPane.add(desktopPane);
JInternalFrame internalFrame=new JInternalFrame("xx",true,true,true,true);
desktopPane.add(internalFrame);
try{
internalFrame.setMaximum(true);
}catch(java.beans.PropertyVetoException e){
System.exit(0);
}
internalFrame.setVisible(true);
setSize(350,350);
show();
}
}
FrmDesigner frame = (FrmDesigner) UITool.getRootWindow((Component) event.getSource());
InternalReportFrame irf = frame.createInternalReportFrame();
try {
irf.setMaximum(true);
}
catch (PropertyVetoException ex) {
}
irf.show();
return irf;
}2. 方法多去了
可以继承JDesktopPane,重载paintComponent方法
可以放一个自定义面板到JDesktopPane的最下层.