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.

setLocation() funktioniert nicht mehr oO?

Empfohlene Antworten

Juten Morgen allerseits!

Hab da so ein kleines Problemchen. Ich habe eine Klasse "TFLabel" von JLabel abgeleitet, platziere sie in meinem JFrame und wird auch gemacht.

Sobald ich auf einen Button klicke, soll das "TFLabel" am Mauszeiger kleben. Das löse ich mit dem MouseMotionAdapter/-Listener. Doch komischerweise bleibt das "TFLabel" da liegen, wo es am Anfang hinplatziert wurde.

Wenn ich es mit dem "normalen" JLabel versuche, geht's. Hab versucht die setLocation() für meine Klasse zu überschreiben, hat aber auch nichts gebracht - ein Aufruf von repaint() brachte ebenfalls nichts.

Irgendjemand 'ne Idee?

gruß

Raphael

Ok, Problem gelöst. Es lag daran, dass ich eine Methode für die Klasse geschrieben habe, die es schon für's JLabel gab, somit habe ich die alte ausversehen überschrieben. Welche es war weiß ich nicht, ich habe alle einfach mal gelöscht und plötzlich funktionierte es. Werd noch herausfinden welche es war :D

Schönen Abend noch

Raphael

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

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.