void propDialog_actionPerformed(ActionEvent evt) { String cmd = evt.getActionCommand(); if (cmd.equals("Cancel") == false) { createContext( propDialog.getHost(), propDialog.getPort(), propDialog.getCommunityName(), propDialog.getSocketType()); sendGetRequest(); } else { System.exit(0); } }
public void init() { String host = util.getHost(); h = new JLabel(host + " up since: "); v = new JLabel(" unknown "); setLayout(new GridLayout(2, 1)); add(h); add(v); try { context = new SnmpContext(host, port); } catch (java.io.IOException exc) { System.out.println("IOException " + exc.getMessage()); System.exit(0); } }
public void init() { // get the host name String host = util.getHost(); h = new JLabel("Host " + host + ", Interface " + intfIndex + " speed"); try { context = new SnmpContext(host, port); context.setCommunity(community); setLayout(new GridLayout(2, 1)); add(h); v = new JLabel(" unknown "); add(v); } catch (java.io.IOException exc) { System.out.println("IOException " + exc.getMessage()); System.exit(0); } }