Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
SnmpGetUI.java.txt
Package: AdventNetSNMPAPI_4.zip [view]
Upload User: aonuowh
Upload Date: 2021-05-23
Package Size: 35390k
Code Size: 3k
Category:
SNMP
Development Platform:
C/C++
- /* $Id: SnmpGetUI.java,v 1.1 2002/06/15 14:40:08 ram Exp $ */
- /* SnmpGetUI.java
- * Copyright (c) 1996-2003 AdventNet, Inc. All Rights Reserved.
- * Please read the associated COPYRIGHTS file for more details.
- */
- import javax.swing.*;
- import java.awt.event.*;
- import com.adventnet.snmp.beans.*;
- import com.adventnet.snmp.ui.*;
- public class SnmpGetUI implements ActionListener {
- SnmpTarget target = new SnmpTarget();
- PropertySettings pptysettings = new PropertySettings();
- JButton button = new JButton();
- JButton button1 = new JButton();
- JButton button2 = new JButton();
- JTextField textfield = new JTextField();
- JTextField textfield1 = new JTextField();
- JLabel label = new JLabel();
- public static void main(String args[]) {
- SnmpGetUI snmpops = new SnmpGetUI ();
- JFrame frame = new JFrame();
- frame.setVisible(true);
- frame.addWindowListener(new WindowAdapter()
- {
- public void windowClosing(WindowEvent evt)
- {
- System.exit(0);
- }
- });
- frame.setSize(615,400);
- frame.setTitle( "Tutorial Example for SNMP Target and Property Settings bean" );
- frame.getContentPane().setLayout(null);
- frame.getContentPane().add(snmpops.label);
- snmpops.label.setBounds(105,40,105,25);
- snmpops.label.setText("Enter the OID");
- frame.getContentPane().add(snmpops.textfield1);
- snmpops.textfield1.setBounds(210,40,140,25);
- frame.getContentPane().add(snmpops.textfield);
- snmpops.textfield.setBounds(30,80,490,85);
- frame.getContentPane().add(snmpops.button);
- snmpops.button.setBounds(80,195,105,35);
- snmpops.button.setText("GET");
- frame.getContentPane().add(snmpops.button1);
- snmpops.button1.setBounds(185,195,105,35);
- snmpops.button1.setText("GET NEXT");
- frame.getContentPane().add(snmpops.button2);
- snmpops.button2.setBounds(290,195,105,35);
- snmpops.button2.setText("Clear");
- frame.getContentPane().add(snmpops.pptysettings);
- snmpops.pptysettings.setBounds(395,190,85,55);
- snmpops.target.setTargetHost("localhost");
- snmpops.pptysettings.addVetoableChangeListener(snmpops.target);
- snmpops.button.addActionListener(snmpops);
- snmpops.button1.addActionListener(snmpops);
- snmpops.button2.addActionListener(snmpops);
- frame.show();
- }
- public void actionPerformed(ActionEvent e) {
- if (e.getActionCommand().equals("GET")) {
- target.setObjectID(textfield1.getText());
- textfield.setText(target.snmpGet());
- }
- else if (e.getActionCommand().equals("GET NEXT")) {
- textfield.setText(target.snmpGetNext());
- }
- else if (e.getActionCommand().equals("Clear")) {
- textfield.setText("");
- }
- }
- }