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

📄 paradialog.java~1~

📁 这是一个udp接收程序
💻 JAVA~1~
字号:
package zjkdata;import java.awt.*;import javax.swing.*;import javax.swing.border.*;/** * <p>Title: </p> * <p>Description: </p> * <p>Copyright: Copyright (c) 2007</p> * <p>Company: </p> * @author not attributable * @version 1.0 */public class ParaDialog extends JDialog {  JPanel panel1 = new JPanel();  JLabel jLabel1 = new JLabel();  JLabel jLabel2 = new JLabel();  JLabel jLabel3 = new JLabel();  JLabel jLabel4 = new JLabel();  JButton jButton1 = new JButton();  JButton jButton2 = new JButton();  JButton jButton3 = new JButton();  JButton jButton4 = new JButton();  JLabel jLabel5 = new JLabel();  JLabel jLabel6 = new JLabel();  JLabel jLabel7 = new JLabel();  JLabel jLabel8 = new JLabel();  JTextField jTextField1 = new JTextField();  BorderLayout borderLayout1 = new BorderLayout();  public ParaDialog(Frame frame, String title, boolean modal) {    super(frame, title, modal);    try {      jbInit();      pack();    }    catch(Exception ex) {      ex.printStackTrace();    }  }  public ParaDialog() {    this(null, "", false);  }  private void jbInit() throws Exception {    panel1.setLayout(null);    this.setResizable(false);    this.setTitle("参数设置");    this.getContentPane().setLayout(borderLayout1);    panel1.setPreferredSize(new Dimension(500,315));    panel1.setRequestFocusEnabled(true);    jLabel1.setEnabled(true);    jLabel1.setBorder(BorderFactory.createEtchedBorder());    jLabel1.setDebugGraphicsOptions(0);    jLabel1.setDoubleBuffered(false);    jLabel1.setDisplayedMnemonic('0');    jLabel1.setHorizontalAlignment(SwingConstants.LEADING);    jLabel1.setHorizontalTextPosition(SwingConstants.TRAILING);    jLabel1.setIcon(new ImageIcon(new java.net.URL("file:///D:/zjkdata/image/paraset.png")));    jLabel1.setText("");    jLabel1.setBounds(new Rectangle(-1, 0, 101, 314));    jLabel2.setBackground(SystemColor.control);    jLabel2.setFont(new java.awt.Font("Dialog", 0, 12));    jLabel2.setForeground(Color.black);    jLabel2.setDebugGraphicsOptions(0);    jLabel2.setOpaque(true);    jLabel2.setHorizontalAlignment(SwingConstants.CENTER);    jLabel2.setText("UDP接收参数");    jLabel2.setBounds(new Rectangle(138, 23, 97, 16));    jLabel3.setBackground(Color.lightGray);    jLabel3.setForeground(Color.white);    jLabel3.setBorder(BorderFactory.createEtchedBorder());    jLabel3.setToolTipText("");    jLabel3.setText("");    jLabel3.setVerticalAlignment(SwingConstants.CENTER);    jLabel3.setBounds(new Rectangle(129, 28, 342, 71));    panel1.setBackground(SystemColor.control);    panel1.setForeground(Color.white);    jLabel4.setBounds(new Rectangle(129, 152, 342, 105));    jLabel4.setVerticalAlignment(SwingConstants.CENTER);    jLabel4.setText("");    jLabel4.setToolTipText("");    jLabel4.setBorder(BorderFactory.createEtchedBorder());    jLabel4.setForeground(Color.white);    jLabel4.setBackground(Color.lightGray);    jButton1.setBounds(new Rectangle(175, 274, 65, 25));    jButton1.setFont(new java.awt.Font("Dialog", 0, 12));    jButton1.setText("提取");    jButton2.setBounds(new Rectangle(252, 274, 65, 25));    jButton2.setFont(new java.awt.Font("Dialog", 0, 12));    jButton2.setText("修改");    jButton3.setBounds(new Rectangle(405, 274, 65, 25));    jButton3.setFont(new java.awt.Font("Dialog", 0, 12));    jButton3.setText("退出");    jButton4.setBounds(new Rectangle(328, 274, 65, 25));    jButton4.setFont(new java.awt.Font("Dialog", 0, 12));    jButton4.setText("保存");    jLabel5.setBounds(new Rectangle(138, 146, 97, 16));    jLabel5.setText("Trap发送参数");    jLabel5.setHorizontalAlignment(SwingConstants.CENTER);    jLabel5.setOpaque(true);    jLabel5.setDebugGraphicsOptions(0);    jLabel5.setForeground(Color.black);    jLabel5.setFont(new java.awt.Font("Dialog", 0, 12));    jLabel5.setBackground(SystemColor.control);    jLabel6.setFont(new java.awt.Font("Dialog", 0, 12));    jLabel6.setText("接收端口");    jLabel6.setBounds(new Rectangle(148, 58, 58, 16));    jLabel7.setFont(new java.awt.Font("Dialog", 0, 12));    jLabel7.setText("端口");    jLabel7.setBounds(new Rectangle(153, 174, 34, 16));    jLabel8.setFont(new java.awt.Font("Dialog", 0, 12));    jLabel8.setToolTipText("");    jLabel8.setVerifyInputWhenFocusTarget(true);    jLabel8.setText("服务器地址");    jLabel8.setBounds(new Rectangle(153, 206, 67, 16));    jTextField1.setBackground(Color.white);    jTextField1.setBorder(BorderFactory.createLoweredBevelBorder());    jTextField1.setText("");    jTextField1.setBounds(new Rectangle(200, 55, 145, 23));    this.getContentPane().add(panel1, BorderLayout.CENTER);    panel1.add(jLabel2, null);    panel1.add(jLabel5, null);    panel1.add(jButton1, null);    panel1.add(jButton2, null);    panel1.add(jButton4, null);    panel1.add(jButton3, null);    panel1.add(jLabel1, null);    panel1.add(jLabel6, null);    panel1.add(jLabel4, null);    panel1.add(jTextField1, null);    panel1.add(jLabel3, null);    panel1.add(jLabel8, null);    panel1.add(jLabel7, null);  }}

⌨️ 快捷键说明

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