JWindow: setVisible(boolean b) : JWindow « javax.swing « Java by API






JWindow: setVisible(boolean b)

 


import javax.swing.JFrame;
import javax.swing.JWindow;

public class Main {
  public static void main(String[] args) {
    JFrame f = new JFrame("The Frame");
    f.setSize(300, 300);
    f.setLocation(100, 100);

    JWindow w = new JWindow();
    w.setSize(300, 300);
    w.setLocation(500, 100);

    f.setVisible(true);
    w.setVisible(true);
  }
}

   
  








Related examples in the same category

1.new JWindow()
2.JWindow: setLocation(int x, int y)
3.JWindow: setSize(int w, int h)