Question: Write a Java program that displays a frame window 300 pixels wide and 200 pixels high with the title My First Frame. Place the frame
Write a Java program that displays a frame window 300 pixels wide and 200 pixels high with the title My First Frame. Place the frame so that its top left corner is at a position 50 pixels from the top of the screen and 100 pixels from the left of the screen. To position a window at a specified location, you use the setLocation method, as in
Through experimentation, determine how the two arguments in the setLocation method affect the positioning of the window.
//assume mainWindow is declared and created frame.setLocation( 50, 50 );
Step by Step Solution
3.48 Rating (155 Votes )
There are 3 Steps involved in it
import javaxswing class jframe public static ... View full answer
Get step-by-step solutions from verified subject matter experts
