splashpanel.java
来自「Store Manager」· Java 代码 · 共 67 行
JAVA
67 行
package com.studio009.store.ui.util;
/**
*
* @author William Chen
*/
public class SplashPanel extends javax.swing.JPanel{
/** Creates new form SplashPanel */
public SplashPanel() {
try {
javax.swing.UIManager.setLookAndFeel(javax.swing.UIManager.getSystemLookAndFeelClassName());
} catch (Exception ex) {
}
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">
private void initComponents() {
lblMessage = new javax.swing.JLabel();
pBar = new javax.swing.JProgressBar();
//pBar.setIndeterminate(true);
lblMessage.setText("\u53d1\u73b0\u65b0\u7248\u672c\u7684\u8f6f\u4ef6\uff0c\u6b63\u5728\u5347\u7ea7\u4e2d\uff0c\u8bf7\u7a0d\u5019...");
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(lblMessage, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 380, Short.MAX_VALUE)
.addComponent(pBar, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 380, Short.MAX_VALUE))
.addContainerGap())
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addContainerGap(250, Short.MAX_VALUE)
.addComponent(lblMessage, javax.swing.GroupLayout.PREFERRED_SIZE, 15, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(pBar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap())
);
}// </editor-fold>
public void setMessage(String info) {
lblMessage.setText(info);
}
public void setProgress(int percent) {
pBar.setValue(percent);
}
public int getProgress() {
return pBar.getValue();
}
private javax.swing.JLabel lblMessage;
private javax.swing.JProgressBar pBar;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?