I would like to retrieve the IP of my PC.
with java I imported this library:
with java I am managed in this way:
how can I do with b4j?
thank you
with java I imported this library:
B4X:
import java.net.*;
with java I am managed in this way:
B4X:
Button btnNewButton = new Button(shell, SWT.NONE);
btnNewButton.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
try {
InetAddress ip= InetAddress.getLocalHost();
JOptionPane.showMessageDialog(null,ip.getHostAddress());
} catch (UnknownHostException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
how can I do with b4j?
thank you