Follow along with the video below to see how to install our site as a web app on your home screen.
Anmerkung: This feature currently requires accessing the site using the built-in Safari browser.
himbeer hat gesagt.:Hallo!
Wer weiß, wie man bei Klick auf einen Button den Buttontext selber ändern kann? Kann mir jemand ein Beispiel geben?
Danke!
Snape hat gesagt.:Tach,
also i.A. geht das immer via
Componente.setText("neuer Text/neue Beschriftung");
also
yourButton.setText("neue Beschriftung");
torsch2711 hat gesagt.:Siehe oben, im Button gibt es eine setLabel function.
Gruss
Torsten
Snape hat gesagt.:Ja Mist, ich gehe immer von Swing aus.
torsch2711 hat gesagt.:auch bei Swing heisst die Funktion setLabel!
ist in der Klasse AbstractButton definiert.
Button b = new Button ("Help me");
....
public void actionPerformed( ActionEvent ae )
{
if( ae.getSource()==b )
b.setLabel("Danke!");
}