0
     public class AdminLogin extends JFrame { 
        static AdminLogin frame;
        private JPanel contentPane;
        private JTextField textField;
        private JPasswordField passwordField;

Is the first line declaring a class or an interface? I had a doubt because I found out that only an interface can extend another interface. And, in the second line, how is AdminLogin behaving? Is it behaving like a JFrame class from which it is extended?

Amogh
  • 1
  • 2
  • @Blobonat: `"extends means always a class"` -- not quite true. [An interface can extend another interface](http://stackoverflow.com/questions/10227410/interface-extends-another-interface-but-implements-its-methods). You can't say that the child interface implements the parent one since it does not implement concrete methods. – Hovercraft Full Of Eels Aug 26 '16 at 13:19

1 Answers1

0

JFrame is a (non-abstract) class, and AdminLogin is extending that class.

AdminLogin extends the functionality of the bare-bones JFrame GUI class, presumably providing specific "login" functionality.

See https://docs.oracle.com/javase/7/docs/api/javax/swing/JFrame.html

Bathsheba
  • 231,907
  • 34
  • 361
  • 483