U
UKP
If you check this method in the main class - JFrame frame = new
QuarterScreenFrame("This is a test", 1);
I'm just not sure what value of topLeft to put..
This is the main class --
public class QuarterScreenTester {
public static void main(String[] args) {
JFrame frame = new QuarterScreenFrame("This is a test", 0,1);
frame.setVisible(true);
frame.setResizable(false);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
-*-*-*-*******************************
This is the sub-class ---
public QuarterScreenFrame(String title, Point topLeft) // creates a
frame with title
{
super(title);
int width;
int height;
int x,y;
Toolkit toolkit = Toolkit.getDefaultToolkit();
Dimension dimensions =toolkit.getScreenSize();
topLeft = new Point (dimensions.width, dimensions.height);
x = topLeft.x;
y = topLeft.y;
setBounds(0,0,x,y);
}
QuarterScreenFrame("This is a test", 1);
I'm just not sure what value of topLeft to put..
This is the main class --
public class QuarterScreenTester {
public static void main(String[] args) {
JFrame frame = new QuarterScreenFrame("This is a test", 0,1);
frame.setVisible(true);
frame.setResizable(false);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
-*-*-*-*******************************
This is the sub-class ---
public QuarterScreenFrame(String title, Point topLeft) // creates a
frame with title
{
super(title);
int width;
int height;
int x,y;
Toolkit toolkit = Toolkit.getDefaultToolkit();
Dimension dimensions =toolkit.getScreenSize();
topLeft = new Point (dimensions.width, dimensions.height);
x = topLeft.x;
y = topLeft.y;
setBounds(0,0,x,y);
}