?? mainpane.java
字號:
import java.awt.*;
import java.awt.Component;
import java.awt.Window;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import javax.swing.*;
import javax.swing.border.*;
public class MainPane extends JPanel
{
protected Component menubar;
protected JToolBar toolbar;
protected Component statusbar;
protected JPanel contentPanel;
public MainPane()
{
super();
initialize();
}
public JMenuBar getMenubar(JFrame frame) {
JMenuBar menuBar = new SystemMenu(frame).createMenuBar();
return menuBar;
}
/**
* Initialize the JApplication.
*/
protected void initialize( ) {
setBorder(BorderFactory.createEtchedBorder());
setLayout(new BorderLayout());
System.out.println("JApplication initalize 3b");
showStartupStatus("Initializing Context Panel");
System.out.println("JApplication initalize 3c");
initializeContentPanel();
System.out.println("JApplication initalize 4");
JPanel mainPanel = new JPanel();
mainPanel.setLayout(new BorderLayout());
//mainPanel.add("North",toolbar = getToolbar());
mainPanel.add("Center", contentPanel);
JStatusBar statusbar = new JStatusBar();
statusbar.setPreferredSize(new Dimension(10,20));
statusbar.setBorder(BorderFactory.createEtchedBorder());
mainPanel.add("South", statusbar);
// add("North", menubar = getMenubar());
add("Center", mainPanel);
}
/**
* Initialize the contentPanel. The contentPanel will contain
* other panels that define the content of the application.
*/
protected void initializeContentPanel( )
{
contentPanel = new JPanel();
contentPanel.setLayout(new BorderLayout());
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -