Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import javax.swing.*;
- import java.awt.*;
- /**
- * Created by kirill on 06.03.17.
- */
- public class SomeTest implements Runnable {
- public static void main(String[] args) {
- SwingUtilities.invokeLater(new SomeTest());
- }
- public void run() {
- JFrame frame = new JFrame("Test frame");
- frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
- JPanel panel = new JPanel();
- panel.setPreferredSize(new Dimension(800, 600));
- frame.add(panel, BorderLayout.CENTER);
- frame.pack();
- frame.setVisible(true);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment