This commit is contained in:
ldy
2026-03-01 23:18:55 -05:00
commit 67f753a5d1
3087 changed files with 218259 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>Question1</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View File

@@ -0,0 +1,2 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8

Binary file not shown.

View File

@@ -0,0 +1,13 @@
import javax.swing.JFrame;
public class MyFrame extends JFrame{
//constructor
public MyFrame() {
this.setTitle("MyFrame Title"); //if comment out, the title would be blank
this.setSize(400, 300); //if comment out, the initiated size would be 0
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //if comment out, the program would still running after clicked close button
this.setLocationRelativeTo(null); //if comment out, the frame would appear at (0, 0)
this.setVisible(true); //if comment out, the window would not be visible
}
}

View File

@@ -0,0 +1,14 @@
public class Start {
public static void main(String[] args) {
javax.swing.SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
new MyFrame();
//new MyFrame(); two same window appeared
}
});
}
}