Update StolowkaZPM.java

This commit is contained in:
s441433 2019-01-12 15:24:55 +01:00
parent fd7e442f66
commit aec11addb2

View File

@ -6,17 +6,17 @@ import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import javax.swing.JPasswordField;
import javax.swing.JTextField;
import java.awt.event.FocusAdapter;
import java.awt.event.FocusEvent;
import java.awt.*;
import javax.swing.SwingConstants;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import javax.swing.ImageIcon;
import gnu.io.CommPortIdentifier;
import java.util.Enumeration;
public class StolowkaZPM {
@ -25,11 +25,20 @@ public class StolowkaZPM {
protected String Dalej;
protected String imie;
protected static int IDuzytkownika;
public void list() {
@SuppressWarnings("rawtypes")
Enumeration ports = CommPortIdentifier.getPortIdentifiers();
while(ports.hasMoreElements())
System.out.println(((CommPortIdentifier)ports.nextElement()).getName());
}
/**
* Launch the application.
*/
public static void main(String[] args) {
new StolowkaZPM().list();
EventQueue.invokeLater(new Runnable() {
public void run() {
try {