Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
StartPoint.java~1~
Package: 汉诺塔图形演示.rar [view]
Upload User: qiye11114
Upload Date: 2010-01-20
Package Size: 126k
Code Size: 2k
Category:
Other Riddle games
Development Platform:
Java
- package hanoi;
- import java.awt.Toolkit;
- import javax.swing.SwingUtilities;
- import javax.swing.UIManager;
- import java.awt.Dimension;
- /**
- * <p>Title: Hanoi Pan</p>
- *
- * <p>Description: </p>
- *
- * <p>Copyright: Copyright (c) 2005</p>
- *
- * <p>Company: </p>
- *
- * @author ZhangYuan
- * @version 1.0
- */
- public class StartPoint {
- boolean packFrame = false;
- /**
- * Construct and show the application.
- */
- public StartPoint() {
- DefaultFrame frame = new DefaultFrame();
- // Validate frames that have preset sizes
- // Pack frames that have useful preferred size info, e.g. from their layout
- if (packFrame) {
- frame.pack();
- } else {
- frame.validate();
- }
- // Center the window
- Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
- Dimension frameSize = frame.getSize();
- if (frameSize.height > screenSize.height) {
- frameSize.height = screenSize.height;
- }
- if (frameSize.width > screenSize.width) {
- frameSize.width = screenSize.width;
- }
- frame.setLocation((screenSize.width - frameSize.width) / 2,
- (screenSize.height - frameSize.height) / 2);
- frame.setVisible(true);
- }
- /**
- * Application entry point.
- *
- * @param args String[]
- */
- public static void main(String[] args) {
- SwingUtilities.invokeLater(new Runnable() {
- public void run() {
- try {
- UIManager.setLookAndFeel(UIManager.
- getSystemLookAndFeelClassName());
- } catch (Exception exception) {
- exception.printStackTrace();
- }
- new StartPoint();
- }
- });
- }
- }