/*主界面
* MainFrame.java
*
* Created on __DATE__, __TIME__
*/
package com.insigma.frame;
import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.URLDecoder;
import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.UIManager;
import org.jvnet.substance.SubstanceLookAndFeel;
import org.jvnet.substance.painter.StandardGradientPainter;
import org.jvnet.substance.theme.SubstanceTerracottaTheme;
import com.insigmamutil.CardThread;
import com.insigmamutil.CommUtil;
import com.insigmamutil.ImageThread;
/**
*
* @author __USER__
*/
public class MainFrame extends javax.swing.JDialog
{
/** Creates new form MainFrame */
public MainFrame(java.awt.Frame parent, boolean modal)
{
super(parent, modal);
initComponents();
this.setLocationRelativeTo(null);// 居中显示
try
{
UIManager.setLookAndFeel(new SubstanceLookAndFeel());
JFrame.setDefaultLookAndFeelDecorated(true);
JDialog.setDefaultLookAndFeelDecorated(true);
SubstanceLookAndFeel
.setCurrentTheme(new SubstanceTerracottaTheme());
//SubstanceLookAndFeel.setSkin(new EmeraldDuskSkin());
//SubstanceLookAndFeel.setCurrentButtonShaper(new
//ClassicButtonShaper());
//SubstanceLookAndFeel.setCurrentWatermark(new
//SubstanceBubblesWatermark());
//SubstanceLookAndFeel.setCurrentBorderPainter(new
// StandardBorderPainter());
// SubstanceLookAndFeel.setCurrentGradientPainter(new
//StandardGradientPainter());//水晶蓝
// SubstanceLookAndFeel.setCurrentTitlePainter(new
// FlatTitlePainter());
} catch (Exception e)冒泡排序java代码详解
{
println("Something went wrong!");
}
try
{
showPerson();
} catch (IOException e)
{
// TODO Auto-generated catch block
e.printStackTrace();
}
}
public void showPerson() throws IOException
{
String filename = URLDecoder.decode(Resource(
"/com/insigma/").getPath());
FileInputStream fileInputStream = new FileInputStream(filename);
InputStreamReader inputStreamReader = new InputStreamReader(
fileInputStream, "gbk");
BufferedReader bufferedReader = new BufferedReader(inputStreamReader);
String name = "";
String bufname = "";
int key = 1;
while ((name = adLine()) != null)
{
if (bufname.equals(""))
bufname = name;
else
bufname = bufname + "\n" + name;
CommUtil.map.put(key, name);
key++;
}
this.jTextArea4.setText(bufname);
this.jLabel4.setText("准备......!");
}
/** 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.
*/
//GEN-BEGIN:initComponents
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents()
{
jLabel1 = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
jLabel3 = new javax.swing.JLabel();
jScrollPane1 = new javax.swing.JScrollPane();
jTextArea1 = new javax.swing.JTextArea();
jScrollPane2 = new javax.swing.JScrollPane();
jTextArea2 = new javax.swing.JTextArea();
jScrollPane3 = new javax.swing.JScrollPane();
jTextArea3 = new javax.swing.JTextArea();
jLabel4 = new javax.swing.JLabel();
jLabel5 = new javax.swing.JLabel();
jScrollPane4 = new javax.swing.JScrollPane();
jTextArea4 = new javax.swing.JTextArea();
jButton1 = new javax.swing.JButton();
jButton2 = new javax.swing.JButton();
jButton3 = new javax.swing.JButton();
jLabel6 = new javax.swing.JLabel();
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论