Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Konstruktor

Empfohlene Antworten

Mein Problem ist, das er den String aus dem JTextField zwar richtig ausliest aber das es bei

>>> buttonrechts=new BuRe(fieldhost,fieldportA,fieldportE); <<< nicht weiter geht!!(Zumindest sieht es so danach aus!! Weil nichts weiter passiert!!!)

Könnt ihr mir dabei helfen?? Ich weiß echt nicht weiter!!!

class Oberfl

extends JFrame

implements ActionListener

{

JTextField field1,field2,field3;

String fieldhost;

String fieldportA;

String fieldportE;

BuRe buttonrechts;

public Oberfl()

{

...

buttonS.addActionListener(new ActionListener()

{

public void actionPerformed(ActionEvent event)

{

String cmd = event.getActionCommand();

if(cmd.equals('SCAN'))

{

fieldhost = field1.getText();

fieldportA = field2.getText();

fieldportE = field3.getText();

buttonrechts=new BuRe(fieldhost,fieldportA,fieldportE);

}

}

});

...

}

class BuRe

{

Variablendeklaration

public BuRe(String host,String portA, String portE)

{

...

}

public void BuRe()

{

...

}

}

Ich wäre für jede Hilfe dankbar!!!

MfG Peeter

PS: Sorry, bin aber esrt bei den Anfängen von JAVA!!!

Hi,

also so an sich sehe ich nicht was der Grund sein soll. Woran siehst Du denn, daß die BuRe Klasse nicht aufgerufen wird??

Versuch doch mal ein paar System.out.println reinzuhauen zu debugging-Zwecken.

MfG Markus

Das hab ich ja schon gemacht!!! Es scheint als wenn er die Klasse wirklich nicht aufruft!!!*dummguck*

Ich weiß aber nicht wieso!! Es passt ja wirklich alles!!

Das System.out.println(....) davor und danach macht er ja!!!*heul*

Woran könnte das liegen??

class Oberflaeche

implements ActionListener

{

BuRe buttonrechts

{

public Oberflaeche()

{

.

.

.

buttonS.addActionListener(new ActionListener()

{

public void actionPerformed(ActionEvent event)

{

final String fieldhost = field1.getText();

final String fieldportA = field2.getText();

final String fieldportE = field3.getText();

System.out.println(fieldportE);

buttonrechts=new BuRe(fieldhost,fieldportA,fieldportE);

System.out.println(fieldportE);

}

});

.

.

.

}

}

class BuRe

{

private String host;

private String portA;

private String portE;

int firstPort;

int lastPort;

int i;

public BuRe(String host,String portA, String portE)

{

this.host = host;

this.portA=portA;

this.portE=portE;

}

public void BuRe()

{

blabla

}

}

schon mal im Voraus vielen DANK!!!!

MfG

Peeter :confused:

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Konto

Navigation

Suchen

Suchen

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.