Three JFrame Windows
Home - About Us
 

 

Three simple JFrame windows:

   import java.awt.*;
   import java.awt.event.*;
   import javax.swing.*;
   
   public class SampleWin3
   {
      public static void main(String [] args)
      {
         JFrame frame = new JFrame("Window 1");
         frame.setSize(100, 100);
         frame.setLocation(10, 10);
         frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         frame.setVisible(true);
			
         JFrame f2 = new JFrame("Window 2");
         f2.setSize(150, 450);
         f2.setLocation(20, 300);
         f2.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         f2.setVisible(true);
			
         JFrame f3 = new JFrame("Window 3");
         f3.setSize(300, 200);
         f3.setLocation(600, 500);
         f3.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         f3.setVisible(true);
      }
   }
Home - About Us
Copyright © 2006 by Kiowok, Ann Arbor, Michigan, USA