50,530
社区成员
发帖
与我相关
我的任务
分享
devices = JpcapCaptor.getDeviceList();
if(devices == null){
JOptionPane.showMessageDialog(frame, "没有找到网卡");
dispose();
return;
}
else{
String[] names = new String[devices.length];
for(int i=0;i < names.length;i++){
names[i] = (devices[i].description == null?devices[i].name:devices[i].description);
}
netJComboBox = new JComboBox(names);
}
netPanel.add(netJComboBox);