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.

Empfohlene Antworten

Veröffentlicht

Hallo,

und zwar habe ich folgendes Problem oder besser gesagt ProblemE:

Ich möchte gerne eine GUI erstellen und habe dies schon mittels Eclipse gemacht.

Nun mein Problem. Ich habe ein Objekt und möchte dieses Objekt in einem JLabel ausgeben lassen. Aber wie mache ich das?

Der Quellcode für das JLabel sieht wie folgt aus:

	

JLabel lblNewLabel = new JLabel("Test");

lblNewLabel.setBounds(655, 39, 305, 306);

frmGlhbirnenrechner.getContentPane().add(lblNewLabel);

Meine nächste Frage:

Ich habe eine JComboBox, wie kann ich dort(in der ComboBox) Werte einfügen und diese in Objekten speichern??????

Dann noch die Frage wie ich das mache dass, das Programm gestartet wird wenn ich auf einen JButton drücke???(Also RUN)

Ich würde mich für schnelle Antworten sehr freuen:)

MfG

Servus,

die Methode zum Einfügen eines Elementes in eine JComboBox dürfte wohl addItem heissen.

2. Externe Applikation ausführen:

Runtime.getRuntime().exec("cmd /c notepad.exe c:\\trouble.bat"); ... als Beispiel

Erstelle ein Konto oder melde dich an, um einen Kommentar zu schreiben.

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.