How to make a jframe

Code examples

8
0

java create jframe

import javax.swing.JFrame;

public class example {
  public static void main(String[] args){
    JFrame frame = new JFrame();
    frame.setSize(100,100);
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOES);
    frame.setTitle("Example Frame");
    frame.setVisible(true);
  }
}
7
0

java create window

//THIS IS A FIX OF THE ONE BY FRANCY FROG
//THEY FIXED THEIRS
import javax.swing.JFrame;

public class example {
  public static void main(String[] args){
    JFrame frame = new JFrame();
    frame.setSize(100,100);
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.setTitle("Example Frame");
    frame.setVisible(true);
  }
}
0
0

make a jframe

There is a typo CLOSE not CLOES :)
0
0

how to create a java jframe

JFrame frame = new JFrame("Test Frame");
 frame.setSize(500,400);
 frame.setVisible(true);
 frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

In other languages

This page is in other languages

Русский
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................