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.

einbindung des packages für lookandfeel

Empfohlene Antworten

Veröffentlicht

hallo,

kann mir jemand sagen, wie ich den classpath verändern muss, damit ich über UIManager.setLookAndFeel() den windowslookandfeel einbinden kann?

das package hört auf den pfad.

com.sun.java.swing.plaf.windows.WindowsLookAndFeel

nu muss ich aber den korrekten Pfad angeben im classpath, damit das gefunden wird.

LG ;)

Da musst du nichts einbinden, das ist Bestandteil des JDK/JRE.

Ich vermute aber mal, du möchtest das Windows Look&Feel auch auf anderen Plattformen als Win verwenden oder? Das ist dort aus, soweit ich weiß, lizenzrechtlichen Gründen aber nicht vorhanden.

Dim

hallö,

das ist seltsam. Bei mir isses ned drin. Wenn ich versuche, es einzubinden, also bei der methode als parameter übergebe, bekomme ich ne ClassNotFoundexception.

LG:)

ah, ok, klappt doch. musste nur ne try-block hinzufügen.

danke

hab noch ne kleine frage ;)

wie heißt denn die Klasse, mit der man immer das lookandfeel des verwendeten Betriebssystems bekommt?

LG

Dafür kannst du folgenden Code verwenden:

UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());

Du musst dann für diese Zeile noch ein paar Exceptions (UnsupportedLookAndFeelException, ClassNotFoundException, InstantiationException, IllegalAccessException, ClassCastException) per try-catch-Block abfangen.

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.