📄 splash.java
字号:
package wapide;import javax.swing.*;import java.awt.*;/** * A spalsh screen dialog to be displayed when starting the IDE. Not yet in * use by the wap package. * Copyright: Copyright (c) 2003 * @author Mark Busman * @version 1.0 * * For License and contact information see WAPIDE.java */public class Splash extends JDialog { private ImageIcon imageLogo; private BorderLayout borderLayout1 = new BorderLayout(); private JPanel jPanel1 = new JPanel(); private JLabel LegalLabel = new JLabel(); private JPanel jPanel2 = new JPanel(); private JLabel TitleLabel = new JLabel(); private BorderLayout borderLayout2 = new BorderLayout(); private GridLayout gridLayout1 = new GridLayout(); private JLabel jLabel1 = new JLabel(); private JLabel LogoLabel = new JLabel(); /** * Constructs the splash screen. */ public Splash() { try { jbInit(); } catch(Exception e) { e.printStackTrace(); } } /** * Initializes the dialog. */ private void jbInit() throws Exception { this.getContentPane().setLayout(borderLayout1); imageLogo = new ImageIcon(wapide.IDEFrame.class.getResource("waplogo.gif")); LegalLabel.setBackground(Color.white); LegalLabel.setForeground(Color.black); LegalLabel.setHorizontalAlignment(SwingConstants.CENTER); LegalLabel.setText("Copyright (C) 2002 Mark Busman"); jPanel1.setBackground(Color.white); jPanel1.setLayout(gridLayout1); jPanel2.setBackground(Color.white); jPanel2.setLayout(borderLayout2); TitleLabel.setBackground(Color.white); TitleLabel.setFont(new java.awt.Font("Dialog", 1, 16)); TitleLabel.setForeground(Color.blue); TitleLabel.setText("W@P Toolkit v.1.0A"); gridLayout1.setRows(2); gridLayout1.setColumns(1); jLabel1.setBackground(Color.white); jLabel1.setForeground(Color.black); jLabel1.setHorizontalAlignment(SwingConstants.CENTER); jLabel1.setText("All Rights Reserved"); LogoLabel.setIcon(imageLogo); LogoLabel.setHorizontalAlignment(SwingConstants.CENTER); LogoLabel.setBackground(Color.white); this.setTitle("Loading..."); this.getContentPane().add(jPanel1, BorderLayout.SOUTH); jPanel1.add(LegalLabel, null); jPanel1.add(jLabel1, null); this.getContentPane().add(jPanel2, BorderLayout.NORTH); jPanel2.add(TitleLabel, BorderLayout.NORTH); this.getContentPane().add(LogoLabel, BorderLayout.CENTER); } /*public static void main(String[] args) { Splash splashscreen = new Splash(); splashscreen.pack(); //Center the window Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); Dimension frameSize = splashscreen.getSize(); if (frameSize.height > screenSize.height) { frameSize.height = screenSize.height; } if (frameSize.width > screenSize.width) { frameSize.width = screenSize.width; } splashscreen.setLocation((screenSize.width - frameSize.width) / 2, (screenSize.height - frameSize.height) / 2); splashscreen.show(); }*/}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -