Hi!
I am supposed to write a programm for making a window.First of all, I must make a window with some given default values. Below is the code that I have been given as a template
public class Window {
private String name;
private int height;
private int width;
private String isActive;
private String color;
int[] WindowPoint=new int[2];
public Window()
{
name="MyWindow";
height=6;
width=12;
WindowPoint[0] =0;
WindowPoint[1] =0;
color="white";
isActive="active";
}
There's something that I cannot understand: In order to make a window, shouldn't I import the JFrame package and say that the Window class is a subclass of JFrame? If so, how can I have a Window constructor instead of using the JFrame built-in constructor in order to make my window? Is there another way to make a window, without using the JFrame or something similar?
Could someone explain this to me? Thank you in advance!