JAVA program broken please help

I need some help guys, what is broken in my code. I'm new to programming so please be easy on the rude comments thanks.

import java.awt.Color;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JOptionPane;

class GUIExampleListener implements WindowListener {

public void windowActivated(WindowEvent e) {}
public void windowClosed(WindowEvent e) {

  System.exit(0);

}
public void windowClosing(WindowEvent e) {}
public void windowDeactivated(WindowEvent e) {}
public void windowDeiconified(WindowEvent e) {}
public void windowIconified(WindowEvent e) {}
public void windowOpened(WindowEvent e) {}
}

class GUIButton extends JButton {

GUIButton() {

  super();
  setButtonAttributes();

}

GUIButton(String buttonLabel) {

  super(buttonLabel);
  setButtonAttributes();

}

private final void setButtonAttributes() {}
}

class GUICloseButton extends GUIButton implements ActionListener {

GUICloseButton() {

  super("close this window");
  setAttributes();

}

public void actionPerformed(ActionEvent e) {

  System.exit(0);

}

private final void setAttributes() {

  setBackground(Color.GREEN);
  addActionListener(this);

}
}

class GUIExample extends JFrame {
public static final int DEFAULT_HEIGHT = 100;
public static final String DEFAULT_TITLE = "An Example GUI";
public static final int DEFAULT_WIDTH = 100;

private Dimension frameSize = null;
private String title = DEFAULT_TITLE;

GUIExample() throws InstantiationException {

  if ( setFrameSize(getHeight(), getWidth()) ) {
    add(new GUICloseButton());
    addWindowListener(new GUIExampleListener());
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    setVisible(true);
  }else 
     throw new InstantiationException("GUIExample cannot be instantiated");

}

final Dimension getFrameSize() {

 return frameSize;

}

final boolean setFrameSize(Dimension frameSize) {
boolean success = false;
int height = 0;
int width = 0;

  if ( frameSize != null ) {
     height    =   (int)frameSize.getHeight();
     width     =   (int)frameSize.getWidth();
     success   =   setFrameSize(height, width);
  }

 return returnThis;

}

final boolean setFrameSize(int height, int width) {
boolean success = true;

  if( (height > 0) && (width > 0) ) {
     try{
        this.frameSize   =   new Dimension(width, height);
        setSize(getFrameSize());           
     }catch (Exception e) {
        success   =   false; 
     }
  }else 
     success      =   false;

  return success;

}
}

public class GUI {

public static void main(String[]args) {
GUIExample exampleGui = null;

  try{
     exampleGui   =   new GUIExample();
  }catch (Exception e) {
     JOptionPane.showMessageDialog(null, "An unexpected error has occurred");
  }

}
}

what does the debugger say?

GUI.java:98: error: cannot find symbol
return returnthis;

if you put it into your IDE is on line 98

There is no variable named "returnThis", you probably want to return success. The code you posted is very illogical and not very well written, I would recommend you go over the content you were reading (to learn Java in the first place) to ensure you understood them. If you understood them correctly and still come with this end product, I would recommend you find a better resource to learn Java.

Thanks Mazen. I respect your advice thank you.

If your looking for a good recommendation, the Oracle Beginners Guide to Java is a nice in-depth book with plenty of examples.

As for your error, the final boolean method is designed to return either a true or false and as @Mazen pointed out returnThis does not exist nor is a boolean value. And from quickly looking at the code should be replaced with success as defined as a boolean value at the start of the method.

Also the method starting at 87 and line 101 have the same name. This is not advised simply because it is a duplicate name. (Unless in a class dedicated to constructors)