Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
21
Task/Window-creation-X11/Java/window-creation-x11-1.java
Normal file
21
Task/Window-creation-X11/Java/window-creation-x11-1.java
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
import javax.swing.JFrame;
|
||||
import javax.swing.SwingUtilities;
|
||||
|
||||
public class WindowExample {
|
||||
|
||||
public static void main(String[] args) {
|
||||
Runnable runnable = new Runnable() {
|
||||
public void run() {
|
||||
createAndShow();
|
||||
}
|
||||
};
|
||||
SwingUtilities.invokeLater(runnable);
|
||||
}
|
||||
|
||||
static void createAndShow() {
|
||||
JFrame frame = new JFrame("Hello World");
|
||||
frame.setSize(640,480);
|
||||
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||||
frame.setVisible(true);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue