⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frame1.java

📁 基于Java的地图数据管理软件。使用MySQL数据库管理系统。
💻 JAVA
字号:
package net.aetherial.gis2.test;

import java.awt.*;
import javax.swing.*;
import net.aetherial.gis2.publicuse.SystemItem;
import net.aetherial.gis2.surface.main.FrameMain;
import net.sourceforge.mlf.metouia.MetouiaLookAndFeel;
import com.borland.jbcl.layout.VerticalFlowLayout;
import java.awt.event.MouseEvent;
import java.awt.event.MouseAdapter;
import com.borland.jbcl.layout.XYLayout;
import com.borland.jbcl.layout.*;

/**
 * <p>Title: </p>
 *
 * <p>Description: </p>
 *
 * <p>Copyright: Copyright (c) 2004</p>
 *
 * <p>Company: </p>
 *
 * @author not attributable
 * @version 1.0
 */
public class Frame1
    extends JFrame {
  BorderLayout borderLayout1 = new BorderLayout();
  JSplitPane jSplitPane1 = new JSplitPane();
  JPanel jPanel1 = new JPanel();
  JPanel jPanel2 = new JPanel();
  BorderLayout borderLayout2 = new BorderLayout();
  JPanel jPanel3 = new JPanel();
  JPanel jPanel4 = new JPanel();
  JLabel jLabel1 = new JLabel();
  JLabel jLabel2 = new JLabel();
  BorderLayout borderLayout3 = new BorderLayout();
  JPanel jPanel5 = new JPanel();
  JLabel jLabel3 = new JLabel();
  JLabel jLabel4 = new JLabel();
  public Frame1() {
    try {
      jbInit();
    }
    catch (Exception exception) {
      exception.printStackTrace();
    }
  }
  public void show(){
    Dimension screenDim = Toolkit.getDefaultToolkit().getScreenSize();
    this.setIconImage(SystemItem.getImage("HSDIlogo.gif"));
    this.setTitle(SystemItem.SOFTWARE_NAME);
    this.setExtendedState(Frame.MAXIMIZED_BOTH);
    this.setSize(830, 700);
    this.setLocation(
        (screenDim.width - 830) / 2,
        (screenDim.height - 700) / 2
        );
    super.show();
  }
  private void jbInit() throws Exception {
    getContentPane().setLayout(borderLayout1);
    jLabel1.setText("message");
    jLabel1.setFont(new java.awt.Font("Dialog", Font.BOLD, 11));
    jLabel1.setForeground(Color.white);
    jLabel1.addMouseListener(new Frame1_jLabel1_mouseAdapter(this));
    this.initLable();
    jPanel3.setLayout(borderLayout3);
    jPanel3.setBackground(SystemItem.TitleBackGroundColor);
    jLabel2.setBackground(Color.orange);
    jLabel2.setText("jLabel2");
    jLabel3.setText("jLabel3");
    jLabel4.setText("jLabel4");
    this.getContentPane().add(jSplitPane1, java.awt.BorderLayout.CENTER);
    jPanel1.setBackground(Color.lightGray);
    jPanel2.setLayout(borderLayout2);
    jPanel4.setBackground(Color.white);
    jPanel4.setBorder(BorderFactory.createLoweredBevelBorder());
    this.setDefaultCloseOperation(EXIT_ON_CLOSE);
    jSplitPane1.add(jPanel1, JSplitPane.TOP);
    jPanel1.add(jLabel2);
    jSplitPane1.add(jPanel2, JSplitPane.BOTTOM);
    jPanel2.add(jPanel3, java.awt.BorderLayout.NORTH);
    jPanel2.add(jPanel4, java.awt.BorderLayout.CENTER);
    jPanel3.add(jLabel1, java.awt.BorderLayout.WEST);
    jPanel3.add(jPanel5, java.awt.BorderLayout.EAST);
    jPanel5.setBackground(SystemItem.TitleBackGroundColor);
    jPanel5.add(jLabel4);
    jPanel5.add(jLabel3);
    jSplitPane1.setOrientation(JSplitPane.VERTICAL_SPLIT);
  }
  private void initLable(){
    this.jLabel1.setIcon(new ImageIcon(SystemItem.getImage("file\\icon\\message.gif")));
    this.jSplitPane1.setDividerSize(2);
  }
  public static void main(String args[]){
    try {
      UIManager.setLookAndFeel(new MetouiaLookAndFeel());
    }
    catch (Exception ex) {
    }
    Frame1 fm= new Frame1();
    fm.show();
  }



  public void jLabel1_mouseClicked(MouseEvent e) {
    if (e.getClickCount()>1) {
      this.jSplitPane1.setDividerLocation(this.getHeight() - this.jSplitPane1.getDividerLocation());
    }

    System.out.println("click count:" + e.getClickCount());
  }

}

class Frame1_jLabel1_mouseAdapter
    extends MouseAdapter {
  private Frame1 adaptee;
  Frame1_jLabel1_mouseAdapter(Frame1 adaptee) {
    this.adaptee = adaptee;
  }

  public void mouseClicked(MouseEvent e) {
    adaptee.jLabel1_mouseClicked(e);
  }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -