import java.awt.event.*; import javax.swing.*; import java.awt.*; import java.net.*; import java.io.*; public class showname implements ActionListener{ ConnectionDetector Conn = new ConnectionDetector(); JFrame f = new JFrame(); Container c = f.getContentPane(); JLabel L1 = new JLabel("net:"); JTextField T1 = new JTextField(); public static void main (String agr[]) throws Exception{ showname a = new showname(); a.createFrame(); } public void createFrame() throws Exception{ c.setLayout(null); L1.setBounds(20,0,500,20); T1.setBounds(50,0,500,20); c.add(L1); c.add(T1); f.setUndecorated(true); f.setSize(600,20); f.setVisible(true); T1.setText(Conn.detect()); } public void actionPerformed(ActionEvent e) { } }