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

📄 unsubscribefriend.java

📁 下了就知道了
💻 JAVA
字号:
/*
 * UnsubscribeFriend.java
 *
 * Created on 2007年3月26日, 下午7:37
 */

package cn.spig1home.chinafish.fqq;

import cn.spig1home.chinafish.fqq.todo.XMLCreator;
import java.io.BufferedOutputStream;
import java.io.IOException;

/**
 *
 * @author  Administrator
 */
public class UnsubscribeFriend extends javax.swing.JFrame {
    private String FriendName = new String();
    //Container	cont;
    private MainScreen  screen;
    private BufferedOutputStream StreamToServer;
    private String userName = new String();
    
    public UnsubscribeFriend(MainScreen  screen, String FriendName, String userName){
        initComponents();
        setTitle("UnSubscribe --- UnsubscribeFriend.java");
        setResizable(false);
        setVisible(true);
        this.screen = screen;
        this.FriendName	= FriendName;
        this.userName = userName;
        this.StreamToServer = screen.getStreamToServer();
    }
    
    /** Creates new form UnsubscribeFriend */
    public UnsubscribeFriend() {
        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" desc=" Generated Code ">//GEN-BEGIN:initComponents
    private void initComponents() {
        jPanel1 = new javax.swing.JPanel();
        m_FriendName = new javax.swing.JLabel();
        m_StaticText = new javax.swing.JLabel();
        m_OK = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "UnsubscribeFriend", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 11), new java.awt.Color(0, 0, 0)));
        m_FriendName.setText("m_FriendName");

        m_StaticText.setText("m_StaticText");

        m_OK.setText("OK");

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(m_FriendName)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                        .addComponent(m_OK, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(m_StaticText, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                .addContainerGap(90, Short.MAX_VALUE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addComponent(m_FriendName)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(m_StaticText)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 19, Short.MAX_VALUE)
                .addComponent(m_OK)
                .addContainerGap())
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        pack();
    }// </editor-fold>//GEN-END:initComponents
    
    /**
     * @param args the command line arguments
     */
//    public static void main(String args[]) {
//        java.awt.EventQueue.invokeLater(new Runnable() {
//            public void run() {
//                new UnsubscribeFriend().setVisible(true);
//            }
//        });
//    }
    
    
    
    public void createReply() {
        XMLCreator		createRequest;
        byte	[]		RequestGenerated;
        
        String[] values = new String[2];
        values[0]			= userName;
        values[1]			= FriendName;
        
        createRequest		= new XMLCreator("UNSUBSCRIBEFRIEND", values);
        RequestGenerated  = createRequest.returnResult();
        
        try {
            StreamToServer.write(RequestGenerated, 0, RequestGenerated.length);
            StreamToServer.flush();
        } catch(IOException exception) {
            System.out.println("Exception in Add Friend " + exception);
        }
    }
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JPanel jPanel1;
    private javax.swing.JLabel m_FriendName;
    private javax.swing.JButton m_OK;
    private javax.swing.JLabel m_StaticText;
    // End of variables declaration//GEN-END:variables
    
}

⌨️ 快捷键说明

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