Update StolowkaZPM.java
This commit is contained in:
parent
fd7e442f66
commit
aec11addb2
@ -6,17 +6,17 @@ import java.awt.event.ActionListener;
|
|||||||
import java.awt.event.ActionEvent;
|
import java.awt.event.ActionEvent;
|
||||||
import javax.swing.JPasswordField;
|
import javax.swing.JPasswordField;
|
||||||
import javax.swing.JTextField;
|
import javax.swing.JTextField;
|
||||||
|
|
||||||
import java.awt.event.FocusAdapter;
|
import java.awt.event.FocusAdapter;
|
||||||
import java.awt.event.FocusEvent;
|
import java.awt.event.FocusEvent;
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import javax.swing.SwingConstants;
|
import javax.swing.SwingConstants;
|
||||||
|
|
||||||
|
|
||||||
import java.sql.Connection;
|
import java.sql.Connection;
|
||||||
import java.sql.PreparedStatement;
|
import java.sql.PreparedStatement;
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import javax.swing.ImageIcon;
|
import javax.swing.ImageIcon;
|
||||||
|
import gnu.io.CommPortIdentifier;
|
||||||
|
import java.util.Enumeration;
|
||||||
|
|
||||||
|
|
||||||
public class StolowkaZPM {
|
public class StolowkaZPM {
|
||||||
|
|
||||||
@ -26,10 +26,19 @@ public class StolowkaZPM {
|
|||||||
protected String imie;
|
protected String imie;
|
||||||
protected static int IDuzytkownika;
|
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.
|
* Launch the application.
|
||||||
*/
|
*/
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
new StolowkaZPM().list();
|
||||||
EventQueue.invokeLater(new Runnable() {
|
EventQueue.invokeLater(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
try {
|
try {
|
||||||
|
Loading…
Reference in New Issue
Block a user