Facebook
From Walloping Motmot, 5 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 263
  1. mport javax.swing.*;
  2. import java.awt.*;
  3.  
  4. public class Okienko {
  5.  
  6.  
  7.  
  8.     private static void createAndShowGUI() {
  9.  
  10.         JFrame frame = new JFrame("Formularz");
  11.         frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  12.  
  13.         JLabel emptyLabel = new JLabel("");
  14.         emptyLabel.setPreferredSize(new Dimension(175, 100));
  15.         frame.getContentPane().add(emptyLabel, BorderLayout.CENTER);
  16.  
  17.         //Display the window.
  18.         frame.pack();
  19.         frame.setVisible(true);
  20.     }
  21.  
  22.     public static void main(String[] args) {
  23.         javax.swing.SwingUtilities.invokeLater(new Runnable() {
  24.             public void run() {
  25.                 createAndShowGUI();
  26.             }
  27.         });
  28.     }
  29.  
  30.  
  31. }