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.

Frames lassen sich nicht ausführen

Empfohlene Antworten

Veröffentlicht

Hallo ich habe ein Problem was mich schon seit längerem daran hindert mir die Frameprogramierung bei Java anzuschauen.

Ich tippe mein Programm ein:

import java.awt.*;

import javax.swing.*;

public class TestFrame1

{

public static void main ( String[] args )

{

JFrame frame = new JFrame("Test Frame 1");

frame.setSize(200,100);

frame.setVisible( true );

}

}

Will es starten bzw. compilieren und dann kommt diese Meldung:

JFrame.java:13:29: cyclic inheritance involving JFrame

public class JFrame extends JFrame {

^

1 error

Was mach ich falsch? Fehlt mir was bestimmtes oder was is los? :(

DAnke schon mal für die Hilfe.^^

Ich würde vermuten, das Du uns den wichtigen Teil Deiner Anwendung vorenthältst. Kann es sein, das Du eine Klasse JFrame geschrieben hast? Wenn ja, dann schmeiß die weg, das willst Du nicht.

Wie kompilierst Du, dieser Fehler kann nur auftreten, wenn Du gleichzeitig Deine Klasse mit der main-Methode und die JFrame Klasse kompilieren willst.

Peter

Stimmt! Hab ich jetz bis vor kurzem auch festgestellt! :upps

Mei was für ein Fehler. Bin halt noch Anfänger :)

Danke jedenfalls!

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.