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

📄 aboutframe.java

📁 运用java3D模拟刚体间的碰撞,爆炸及在万有引力作用下的运动轨迹,设置适当的参数可以模拟天体运动等多种物理现象.
💻 JAVA
字号:
/***************************************************

Copyright 2003 Ben Childs


This file is part of Physics 3D.

    Physics 3D is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    Physics 3D is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Physics 3D; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA




***************************************************/

package com.bchilds.Physics3D;


import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

public class AboutFrame extends javax.swing.JFrame {

// IMPORTANT: Source code between BEGIN/END comment pair will be regenerated
// every time the form is saved. All manual changes will be overwritten.
// BEGIN GENERATED CODE
	// member declarations
	javax.swing.JLabel jLabel1 = new javax.swing.JLabel();
	javax.swing.JButton okButton = new javax.swing.JButton();
	javax.swing.JLabel versionLabel = new javax.swing.JLabel();
	javax.swing.JLabel jLabel2 = new javax.swing.JLabel();
	javax.swing.JTextArea jTextArea1 = new javax.swing.JTextArea();
// END GENERATED CODE

	public AboutFrame() {
	}

	public void initComponents() throws Exception {
// IMPORTANT: Source code between BEGIN/END comment pair will be regenerated
// every time the form is saved. All manual changes will be overwritten.
// BEGIN GENERATED CODE
		// the following code sets the frame's initial state
		java.awt.Image img0 = getToolkit().getImage(ClassLoader.getSystemResource("physics3d.gif"));
		// Note: for non-URL based images, relative paths are generated;
		// If not generating a JAR file, create valid relative location for deployment;

		jLabel1.setFont(new java.awt.Font("Dialog", 3, 24));
		jLabel1.setHorizontalAlignment(javax.swing.JLabel.CENTER);
		jLabel1.setLocation(new java.awt.Point(10, 10));
		jLabel1.setSize(new java.awt.Dimension(210, 40));
		jLabel1.setText("About Physics3D");
		jLabel1.setVisible(true);
		okButton.setLocation(new java.awt.Point(70, 90));
		okButton.setSize(new java.awt.Dimension(90, 30));
		okButton.setText("Ok");
		okButton.setVisible(true);
		versionLabel.setHorizontalAlignment(javax.swing.JLabel.CENTER);
		versionLabel.setLocation(new java.awt.Point(10, 60));
		versionLabel.setSize(new java.awt.Dimension(210, 20));
		versionLabel.setText("Version: " + Physics3D.version);
		versionLabel.setVisible(true);
		jLabel2.setHorizontalAlignment(javax.swing.JLabel.CENTER);
		jLabel2.setLocation(new java.awt.Point(10, 130));
		jLabel2.setSize(new java.awt.Dimension(210, 20));
		jLabel2.setText("Copyright 2003 - Ben Childs");
		jLabel2.setVisible(true);
		jTextArea1.setBackground(new java.awt.Color(204, 204, 204));
		jTextArea1.setEditable(false);
		jTextArea1.setFont(new java.awt.Font("Dialog", 1, 12));
		jTextArea1.setLineWrap(true);
		jTextArea1.setLocation(new java.awt.Point(10, 160));
		jTextArea1.setRows(1);
		jTextArea1.setSize(new java.awt.Dimension(210, 50));
		jTextArea1.setText("Distributed Under the GNU General Public License. See License.txt for more info.");
		jTextArea1.setWrapStyleWord(true);
		jTextArea1.setOpaque(false);
		jTextArea1.setVisible(true);
		
		
		setIconImage(img0);
		getContentPane().setLayout(null);
		setLocation(new java.awt.Point(0, 0));
		setTitle("AboutFrame");

		getContentPane().add(jLabel1);
		getContentPane().add(okButton);
		getContentPane().add(versionLabel);
		getContentPane().add(jLabel2);
		getContentPane().add(jTextArea1);

		setSize(new java.awt.Dimension(235, 244));

		// event handling
		okButton.addActionListener(new java.awt.event.ActionListener() {
			public void actionPerformed(java.awt.event.ActionEvent e) {
				okButtonActionPerformed(e);
			}
		});
		addWindowListener(new java.awt.event.WindowAdapter() {
			public void windowClosing(java.awt.event.WindowEvent e) {
				thisWindowClosing(e);
			}
		});

// END GENERATED CODE
		
		jTextArea1.setAlignmentX(JTextArea.CENTER_ALIGNMENT);
		
		Dimension screenSize = getToolkit().getScreenSize();
		setLocation(((int)screenSize.getWidth() / 2) - (this.getWidth() / 2), ((int)screenSize.getHeight() / 2) - (this.getHeight() / 2));

	}

	// Close the window when the close box is clicked
	void thisWindowClosing(java.awt.event.WindowEvent e) {
		setVisible(false);
		dispose();
	}
	
	public void okButtonActionPerformed(java.awt.event.ActionEvent e) {
		thisWindowClosing(null);
	}
		
}

⌨️ 快捷键说明

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