File tree Expand file tree Collapse file tree 4 files changed +42
-0
lines changed
Expand file tree Collapse file tree 4 files changed +42
-0
lines changed Original file line number Diff line number Diff line change 1+ * .class
Original file line number Diff line number Diff line change 1+ {
2+ "editor.tabSize" : 4 ,
3+ "editor.rulers" : [
4+ 80
5+ ],
6+ "trailing-spaces.trimOnSave" : true ,
7+ "java.project.referencedLibraries" : [
8+ " lib/**/*.jar"
9+ ]
10+ }
Original file line number Diff line number Diff line change 1+ import java .awt .event .ActionEvent ;
2+ import java .awt .event .ActionListener ;
3+
4+ import javax .swing .JButton ;
5+ import javax .swing .JFrame ;
6+ import javax .swing .JLabel ;
7+ import javax .swing .JPanel ;
8+ import javax .swing .JTextField ;
9+
10+ public class HelloWorld {
11+ public static void main (String [] args ) {
12+ JFrame frame = new JFrame ("My application" );
13+ frame .setDefaultCloseOperation (JFrame .EXIT_ON_CLOSE );
14+ frame .setSize (400 , 200 );
15+
16+ JLabel label = new JLabel ("Hello, world!" );
17+ frame .add (label );
18+
19+ frame .setVisible (true );
20+ }
21+ }
Original file line number Diff line number Diff line change 1+ # Swing 예제
2+
3+ - < https://docs.oracle.com/javase/tutorial/uiswing/index.html >
4+ - < https://docs.oracle.com/javase/tutorial/uiswing/examples/start/HelloWorldSwingProject/src/start/HelloWorldSwing.java >
5+
6+ ``` bash
7+ javac -d out HelloWorld.java
8+
9+ java --class-path out HelloWorld
10+ ```
You can’t perform that action at this time.
0 commit comments