📄 main.java
字号:
/*
* Main.java
*
* Created on 2008年3月13日, 下午3:18
*/
package pda;
/**
*
* @author Administrator
*/
public class Main extends javax.swing.JFrame {
/** Creates new form Main */
public Main() {
super("功能界面");
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.
*/
// <editor-fold defaultstate="collapsed" desc=" 生成的代码 ">//GEN-BEGIN:initComponents
private void initComponents() {
jLabel1 = new javax.swing.JLabel();
diarybook = new javax.swing.JButton();
phonebook = new javax.swing.JButton();
notebook = new javax.swing.JButton();
exit = new javax.swing.JButton();
jTabbedPane1 = new javax.swing.JTabbedPane();
jScrollPane1 = new javax.swing.JScrollPane();
diarySay = new javax.swing.JTextArea();
jScrollPane2 = new javax.swing.JScrollPane();
phoneSay = new javax.swing.JTextArea();
jScrollPane3 = new javax.swing.JScrollPane();
noteSay = new javax.swing.JTextArea();
jLabel2 = new javax.swing.JLabel();
jMenuBar1 = new javax.swing.JMenuBar();
function = new javax.swing.JMenu();
diary = new javax.swing.JMenuItem();
phone = new javax.swing.JMenuItem();
note = new javax.swing.JMenuItem();
loginMenuItem = new javax.swing.JMenuItem();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
jLabel1.setFont(new java.awt.Font("宋体", 1, 14));
jLabel1.setText("\u529f\u80fd\u5982\u4e0b");
diarybook.setText("\u65e5\u5fd7");
diarybook.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
diarybookActionPerformed(evt);
}
});
phonebook.setText("\u7535\u8bdd\u672c");
phonebook.setMaximumSize(new java.awt.Dimension(100, 26));
phonebook.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
phonebookActionPerformed(evt);
}
});
notebook.setText("\u5907\u5fd8\u5f55");
notebook.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
notebookActionPerformed(evt);
}
});
exit.setText("\u9000\u51fa");
exit.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
exitActionPerformed(evt);
}
});
diarySay.setColumns(10);
diarySay.setEditable(false);
diarySay.setFont(new java.awt.Font("宋体", 0, 13));
diarySay.setRows(5);
diarySay.setText(" \u5355\u51fb\u65e5\u5fd7\u6309\u94ae\u6216\u65e5\u5fd7\u83dc\u5355\u9879\n\u8fdb\u5165\u65e5\u5386\u540e\uff0c\u8bf7\u5355\u51fb\u4f60\u9009\u62e9\u7684\u65e5\n\u671f\u3002\u82e5\u8be5\u65e5\u671f\u5b58\u5728\u5199\u8fc7\u7684\u65e5\u5fd7\u5c06\n\u5f39\u51fa\u65e5\u5fd7\u5185\u5bb9\uff0c\u82e5\u4e0d\u5b58\u5728\u5c06\u5f39\u51fa\n\u65b0\u5efa\u65e5\u5fd7\u5bf9\u8bdd\u6846\u3002\n\n \u2014\u2014\u65e5\u5fd7\n \u8bb0\u5f55\u4e0b\u751f\u6d3b\u4e2d\u7684\u70b9\u6ef4\u611f\u53d7\uff0c\n\u8bb0\u5f55\u4e0b\u751f\u6d3b\u4e2d\u7684\u5fc3\u8def\u5386\u7a0b\u3002");
jScrollPane1.setViewportView(diarySay);
jTabbedPane1.addTab("\u65e5\u5fd7", jScrollPane1);
phoneSay.setColumns(10);
phoneSay.setEditable(false);
phoneSay.setFont(new java.awt.Font("宋体", 0, 13));
phoneSay.setRows(5);
phoneSay.setText(" \u5355\u51fb\u7535\u8bdd\u672c\u6309\u94ae\u6216\u7535\u8bdd\u672c\u83dc\n\u5355\u9009\u9879\u8fdb\u5165\u7535\u8bdd\u672c\u529f\u80fd\u5bf9\u8bdd\u6846\u3002\n\u672c\u7535\u8bdd\u672c\u5177\u6709\u67e5\u8be2\u3001\u6dfb\u52a0\u3001\u4fee\u6539\n\u3001\u5220\u9664\u56db\u9879\u57fa\u672c\u529f\u80fd\u3002\u8fd8\u53ef\u4ee5\u8fdb\n\u884c\u7535\u8bdd\u53f7\u7801\u6a21\u7cca\u67e5\u8be2\u3002\n\n \u2014\u2014\u7535\u8bdd\u672c\n \u8bb0\u5f55\u4e0b\u6bcf\u4e00\u4e2a\u670b\u53cb\u7684\u8054\u7cfb\u65b9\n\u5f0f\uff0c\u8bb0\u5f55\u4e0b\u5f7c\u6b64\u6c9f\u901a\u7684\u65b9\u5f0f\u3002");
jScrollPane2.setViewportView(phoneSay);
jTabbedPane1.addTab("\u7535\u8bdd\u672c", jScrollPane2);
noteSay.setColumns(10);
noteSay.setEditable(false);
noteSay.setFont(new java.awt.Font("宋体", 0, 13));
noteSay.setRows(5);
noteSay.setText(" \u5355\u51fb\u5907\u5fd8\u5f55\u6309\u94ae\u6216\u5907\u5fd8\u5f55\u83dc\n\u5355\u9009\u9879\u8fdb\u5165\u5907\u5fd8\u5f55\u529f\u80fd\u5bf9\u8bdd\u6846\u3002\n\u6b64\u5907\u5fd8\u5f55\u5177\u6709\u6dfb\u52a0\u3001\u5220\u9664\u3001\u63d0\u9192\n\u3001\u5237\u65b0\u56db\u9879\u57fa\u672c\u529f\u80fd\uff0c\u80fd\u51c6\u65f6\u63d0\n\u9192\u4f60\u5b8c\u6210\u8981\u505a\u7684\u4e8b\u60c5\u3002\n\n \u2014\u2014\u5907\u5fd8\u5f55\n \u8bb0\u5f55\u4e0b\u81ea\u5df1\u8981\u505a\u7684\u4e8b\u60c5\uff0c\u63d0\n\u9192\u81ea\u5df1\uff0c\u517b\u6210\u597d\u7684\u4e60\u60ef\u3002");
jScrollPane3.setViewportView(noteSay);
jTabbedPane1.addTab("\u5907\u5fd8\u5f55", jScrollPane3);
jTabbedPane1.getAccessibleContext().setAccessibleName("rizhi");
jLabel2.setFont(new java.awt.Font("宋体", 1, 14));
jLabel2.setText("\u529f\u80fd\u8bf4\u660e");
function.setText("\u529f\u80fd");
diary.setText("\u65e5\u5fd7");
diary.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
diaryActionPerformed(evt);
}
});
function.add(diary);
phone.setText("\u7535\u8bdd\u672c");
phone.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
phoneActionPerformed(evt);
}
});
function.add(phone);
note.setText("\u5907\u5fd8\u5f55");
note.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
noteActionPerformed(evt);
}
});
function.add(note);
loginMenuItem.setText("\u91cd\u65b0\u767b\u5f55");
loginMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
loginMenuItemActionPerformed(evt);
}
});
function.add(loginMenuItem);
jMenuBar1.add(function);
setJMenuBar(jMenuBar1);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(28, 28, 28)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(exit, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(notebook, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(phonebook, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(diarybook, javax.swing.GroupLayout.PREFERRED_SIZE, 94, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(52, 52, 52)
.addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 195, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(31, Short.MAX_VALUE))
.addGroup(layout.createSequentialGroup()
.addGap(46, 46, 46)
.addComponent(jLabel1)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 136, Short.MAX_VALUE)
.addComponent(jLabel2)
.addGap(98, 98, 98))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel1)
.addComponent(jLabel2))
.addGap(16, 16, 16)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addGroup(layout.createSequentialGroup()
.addComponent(diarybook, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(20, 20, 20)
.addComponent(phonebook, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(notebook, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(16, 16, 16)
.addComponent(exit, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(jTabbedPane1))
.addContainerGap(39, Short.MAX_VALUE))
);
java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
setBounds((screenSize.width-408)/2, (screenSize.height-317)/2, 408, 317);
}// </editor-fold>//GEN-END:initComponents
private void notebookActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_notebookActionPerformed
// TODO 将在此处添加您的处理代码:
NoteBook nb=new NoteBook();
nb.setVisible(true);
}//GEN-LAST:event_notebookActionPerformed
private void noteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_noteActionPerformed
// TODO 将在此处添加您的处理代码:
NoteBook nb=new NoteBook();
nb.setVisible(true);
}//GEN-LAST:event_noteActionPerformed
private void phoneActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_phoneActionPerformed
// TODO 将在此处添加您的处理代码:
showPhoneBook spb=new showPhoneBook();
spb.setVisible(true);
}//GEN-LAST:event_phoneActionPerformed
private void diaryActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_diaryActionPerformed
// TODO 将在此处添加您的处理代码:
MyCalendar mc=new MyCalendar();
mc.setVisible(true);
}//GEN-LAST:event_diaryActionPerformed
private void phonebookActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_phonebookActionPerformed
// TODO 将在此处添加您的处理代码:
showPhoneBook spb=new showPhoneBook();
spb.setVisible(true);
}//GEN-LAST:event_phonebookActionPerformed
private void diarybookActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_diarybookActionPerformed
// TODO 将在此处添加您的处理代码:
MyCalendar mc=new MyCalendar();
mc.setVisible(true);
}//GEN-LAST:event_diarybookActionPerformed
private void exitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_exitActionPerformed
// TODO 将在此处添加您的处理代码:
System.exit(0);
}//GEN-LAST:event_exitActionPerformed
private void loginMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_loginMenuItemActionPerformed
// TODO add your handling code here:
this.setVisible(false);
Login l=new Login();
l.setVisible(true);
}//GEN-LAST:event_loginMenuItemActionPerformed
/**
* @param args the command line arguments
*/
/*public static void main(String args[]) {
Main m=new Main();
m.setVisible(true);
}*/
// 变量声明 - 不进行修改//GEN-BEGIN:variables
private javax.swing.JMenuItem diary;
private javax.swing.JTextArea diarySay;
private javax.swing.JButton diarybook;
private javax.swing.JButton exit;
private javax.swing.JMenu function;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JMenuBar jMenuBar1;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JScrollPane jScrollPane2;
private javax.swing.JScrollPane jScrollPane3;
private javax.swing.JTabbedPane jTabbedPane1;
private javax.swing.JMenuItem loginMenuItem;
private javax.swing.JMenuItem note;
private javax.swing.JTextArea noteSay;
private javax.swing.JButton notebook;
private javax.swing.JMenuItem phone;
private javax.swing.JTextArea phoneSay;
private javax.swing.JButton phonebook;
// 变量声明结束//GEN-END:variables
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -