Hallo, folgende Schwierigkeit, ich möchte ein Objekt der Klasse B im Konstruktor der Klasse A durch den Aufruf des Konstruktors der Klasse A aus dem Konstruktor der Klasse B kreieren. Am besten die paar Zeilen Code anschauen,
Klasse A,
Konstruktor der Klasse B,
Fehlermeldung,
constructor FrameView in class org.jdesktop.application.FrameView cannot be applied to given types,
- required
rg.Jdesktop.application.Application
- found: no arguments
-reason: actual and formal argument lists differ in length
Ich habe andere Klassen bei denen diese Art der Objekt Definition funktioniert, aber nicht hier.
Gruß
Klasse A,
Java:
public final class OsensaViewView extends FrameView {
.
//Definition
private AdvancedConfigurationFrame advCnfgFrmGUI;
.
.
//Konstruktor der Klasse A
public OsensaViewView(AdvancedConfigurationFrame _GUI)
{
advCnfgFrmGUI = _GUI;
}
.
.
Konstruktor der Klasse B,
Java:
public class AdvancedConfigurationFrame extends javax.swing.JFrame {
.
.
//Konstruktor
public AdvancedConfigurationFrame() {
.
new OsensaViewView(this);
.
}
.
.
Fehlermeldung,
constructor FrameView in class org.jdesktop.application.FrameView cannot be applied to given types,
- required
- found: no arguments
-reason: actual and formal argument lists differ in length
Ich habe andere Klassen bei denen diese Art der Objekt Definition funktioniert, aber nicht hier.
Gruß