1 #1

Closed
fdzcxy212206272 wants to merge 0 commits from <deleted>:main into master

3
.idea/.gitignore vendored

@ -0,0 +1,3 @@
# Default ignored files
/shelf/
/workspace.xml

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8 (2)" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

@ -2,8 +2,8 @@
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/First_Jisuan1/First_Jisuan1.iml" filepath="$PROJECT_DIR$/First_Jisuan1/First_Jisuan1.iml" />
<module fileurl="file://$PROJECT_DIR$/Second_Jinzhi/Second_Jinzhi.iml" filepath="$PROJECT_DIR$/Second_Jinzhi/Second_Jinzhi.iml" />
<module fileurl="file://$PROJECT_DIR$/chen123/chen123.iml" filepath="$PROJECT_DIR$/chen123/chen123.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/pan.iml" filepath="$PROJECT_DIR$/.idea/pan.iml" />
</modules>
</component>
</project>

@ -2,9 +2,7 @@
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>

@ -1,157 +0,0 @@
Index: jinzhi/src/jinzhi2.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/jinzhi/src/jinzhi2.java b/Second_Jinzhi/src/jinzhi2.java
rename from jinzhi/src/jinzhi2.java
rename to Second_Jinzhi/src/jinzhi2.java
--- a/jinzhi/src/jinzhi2.java (revision 750ee041e6c7dddb3e19241d224a19832b7199fe)
+++ b/Second_Jinzhi/src/jinzhi2.java (date 1729153446429)
@@ -28,7 +28,7 @@
//图形化界面函数
public void mainFrame() {
//设置窗口的参数
- setBounds(500,50,530,500);
+ setBounds(500,50,530,530);
//禁用重新调整窗口大小的功能
setResizable(false);
//关闭窗口的右上角的叉的同时关闭程序
Index: jisuan/src/Main.java
===================================================================
diff --git a/jisuan/src/Main.java b/jisuan/src/Main.java
deleted file mode 100644
--- a/jisuan/src/Main.java (revision 750ee041e6c7dddb3e19241d224a19832b7199fe)
+++ /dev/null (revision 750ee041e6c7dddb3e19241d224a19832b7199fe)
@@ -1,5 +0,0 @@
-public class Main {
- public static void main(String[] args) {
- System.out.println("Hello world!");
- }
-}
\ No newline at end of file
Index: .idea/modules.xml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
<+><?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<project version=\"4\">\r\n <component name=\"ProjectModuleManager\">\r\n <modules>\r\n <module fileurl=\"file://$PROJECT_DIR$/jisuan/First_Jisuan.iml\" filepath=\"$PROJECT_DIR$/jisuan/First_Jisuan.iml\" />\r\n <module fileurl=\"file://$PROJECT_DIR$/jinzhi/Second_Jinzhi.iml\" filepath=\"$PROJECT_DIR$/jinzhi/Second_Jinzhi.iml\" />\r\n <module fileurl=\"file://$PROJECT_DIR$/test6298.iml\" filepath=\"$PROJECT_DIR$/test6298.iml\" />\r\n </modules>\r\n </component>\r\n</project>
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/.idea/modules.xml b/.idea/modules.xml
--- a/.idea/modules.xml (revision 750ee041e6c7dddb3e19241d224a19832b7199fe)
+++ b/.idea/modules.xml (date 1729153446565)
@@ -2,8 +2,8 @@
<project version="4">
<component name="ProjectModuleManager">
<modules>
- <module fileurl="file://$PROJECT_DIR$/jisuan/First_Jisuan.iml" filepath="$PROJECT_DIR$/jisuan/First_Jisuan.iml" />
- <module fileurl="file://$PROJECT_DIR$/jinzhi/Second_Jinzhi.iml" filepath="$PROJECT_DIR$/jinzhi/Second_Jinzhi.iml" />
+ <module fileurl="file://$PROJECT_DIR$/First_Jisuan/First_Jisuan.iml" filepath="$PROJECT_DIR$/First_Jisuan/First_Jisuan.iml" />
+ <module fileurl="file://$PROJECT_DIR$/Second_Jinzhi/Second_Jinzhi.iml" filepath="$PROJECT_DIR$/Second_Jinzhi/Second_Jinzhi.iml" />
<module fileurl="file://$PROJECT_DIR$/test6298.iml" filepath="$PROJECT_DIR$/test6298.iml" />
</modules>
</component>
Index: .idea/workspace.xml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
<+><?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<project version=\"4\">\r\n <component name=\"AutoImportSettings\">\r\n <option name=\"autoReloadType\" value=\"SELECTIVE\" />\r\n </component>\r\n <component name=\"ChangeListManager\">\r\n <list default=\"true\" id=\"240004e1-ef35-41dc-944d-01a893c69670\" name=\"Changes\" comment=\"\">\r\n <change afterPath=\"$PROJECT_DIR$/.idea/uiDesigner.xml\" afterDir=\"false\" />\r\n <change afterPath=\"$PROJECT_DIR$/jinzhi/src/jinzhi2.java\" afterDir=\"false\" />\r\n <change beforePath=\"$PROJECT_DIR$/.idea/.gitignore\" beforeDir=\"false\" />\r\n <change beforePath=\"$PROJECT_DIR$/.idea/modules.xml\" beforeDir=\"false\" afterPath=\"$PROJECT_DIR$/.idea/modules.xml\" afterDir=\"false\" />\r\n <change beforePath=\"$PROJECT_DIR$/jinzhi/jinzhi.iml\" beforeDir=\"false\" afterPath=\"$PROJECT_DIR$/jinzhi/Second_Jinzhi.iml\" afterDir=\"false\" />\r\n <change beforePath=\"$PROJECT_DIR$/jinzhi/src/JinZhi.java\" beforeDir=\"false\" />\r\n <change beforePath=\"$PROJECT_DIR$/jisuan/jisuan.iml\" beforeDir=\"false\" afterPath=\"$PROJECT_DIR$/jisuan/First_Jisuan.iml\" afterDir=\"false\" />\r\n <change beforePath=\"$PROJECT_DIR$/out/production/jinzhi/JinZhi.class\" beforeDir=\"false\" />\r\n </list>\r\n <option name=\"SHOW_DIALOG\" value=\"false\" />\r\n <option name=\"HIGHLIGHT_CONFLICTS\" value=\"true\" />\r\n <option name=\"HIGHLIGHT_NON_ACTIVE_CHANGELIST\" value=\"false\" />\r\n <option name=\"LAST_RESOLUTION\" value=\"IGNORE\" />\r\n </component>\r\n <component name=\"FileTemplateManagerImpl\">\r\n <option name=\"RECENT_TEMPLATES\">\r\n <list>\r\n <option value=\"Class\" />\r\n </list>\r\n </option>\r\n </component>\r\n <component name=\"Git.Settings\">\r\n <option name=\"RECENT_BRANCH_BY_REPOSITORY\">\r\n <map>\r\n <entry key=\"$PROJECT_DIR$\" value=\"main\" />\r\n </map>\r\n </option>\r\n <option name=\"RECENT_GIT_ROOT_PATH\" value=\"$PROJECT_DIR$\" />\r\n </component>\r\n <component name=\"ProjectColorInfo\">{\r\n &quot;associatedIndex&quot;: 5\r\n}</component>\r\n <component name=\"ProjectId\" id=\"2nFBmc5uTbrylp6kD7GKdOhgrTY\" />\r\n <component name=\"ProjectViewState\">\r\n <option name=\"autoscrollFromSource\" value=\"true\" />\r\n <option name=\"flattenPackages\" value=\"true\" />\r\n <option name=\"hideEmptyMiddlePackages\" value=\"true\" />\r\n <option name=\"showLibraryContents\" value=\"true\" />\r\n </component>\r\n <component name=\"PropertiesComponent\"><![CDATA[{\r\n \"keyToString\": {\r\n \"Application.JinZhi.executor\": \"Run\",\r\n \"Application.jinzhi2.executor\": \"Run\",\r\n \"Application.mm.executor\": \"Run\",\r\n \"RunOnceActivity.ShowReadmeOnStart\": \"true\",\r\n \"SHARE_PROJECT_CONFIGURATION_FILES\": \"true\",\r\n \"git-widget-placeholder\": \"master\",\r\n \"kotlin-language-version-configured\": \"true\"\r\n }\r\n}]]></component>\r\n <component name=\"RunManager\" selected=\"Application.jinzhi2\">\r\n <configuration name=\"JinZhi\" type=\"Application\" factoryName=\"Application\" temporary=\"true\" nameIsGenerated=\"true\">\r\n <option name=\"MAIN_CLASS_NAME\" value=\"JinZhi\" />\r\n <module name=\"Second_Jinzhi\" />\r\n <method v=\"2\">\r\n <option name=\"Make\" enabled=\"true\" />\r\n </method>\r\n </configuration>\r\n <configuration name=\"jinzhi2\" type=\"Application\" factoryName=\"Application\" temporary=\"true\" nameIsGenerated=\"true\">\r\n <option name=\"MAIN_CLASS_NAME\" value=\"jinzhi2\" />\r\n <module name=\"Second_Jinzhi\" />\r\n <method v=\"2\">\r\n <option name=\"Make\" enabled=\"true\" />\r\n </method>\r\n </configuration>\r\n <recent_temporary>\r\n <list>\r\n <item itemvalue=\"Application.jinzhi2\" />\r\n <item itemvalue=\"Application.JinZhi\" />\r\n </list>\r\n </recent_temporary>\r\n </component>\r\n <component name=\"SpellCheckerSettings\" RuntimeDictionaries=\"0\" Folders=\"0\" CustomDictionaries=\"0\" DefaultDictionary=\"application-level\" UseSingleDictionary=\"true\" transferred=\"true\" />\r\n <component name=\"TaskManager\">\r\n <task active=\"true\" id=\"Default\" summary=\"Default task\">\r\n <changelist id=\"240004e1-ef35-41dc-944d-01a893c69670\" name=\"Changes\" comment=\"\" />\r\n <created>1728559103908</created>\r\n <option name=\"number\" value=\"Default\" />\r\n <option name=\"presentableId\" value=\"Default\" />\r\n <updated>1728559103908</updated>\r\n </task>\r\n <servers />\r\n </component>\r\n</project>
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
--- a/.idea/workspace.xml (revision 750ee041e6c7dddb3e19241d224a19832b7199fe)
+++ b/.idea/workspace.xml (date 1729153446592)
@@ -4,15 +4,13 @@
<option name="autoReloadType" value="SELECTIVE" />
</component>
<component name="ChangeListManager">
- <list default="true" id="240004e1-ef35-41dc-944d-01a893c69670" name="Changes" comment="">
- <change afterPath="$PROJECT_DIR$/.idea/uiDesigner.xml" afterDir="false" />
- <change afterPath="$PROJECT_DIR$/jinzhi/src/jinzhi2.java" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/.idea/.gitignore" beforeDir="false" />
- <change beforePath="$PROJECT_DIR$/.idea/modules.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/modules.xml" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/jinzhi/jinzhi.iml" beforeDir="false" afterPath="$PROJECT_DIR$/jinzhi/Second_Jinzhi.iml" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/jinzhi/src/JinZhi.java" beforeDir="false" />
- <change beforePath="$PROJECT_DIR$/jisuan/jisuan.iml" beforeDir="false" afterPath="$PROJECT_DIR$/jisuan/First_Jisuan.iml" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/out/production/jinzhi/JinZhi.class" beforeDir="false" />
+ <list default="true" id="240004e1-ef35-41dc-944d-01a893c69670" name="Changes" comment="第二题修改">
+ <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/jinzhi/Second_Jinzhi.iml" beforeDir="false" afterPath="$PROJECT_DIR$/Second_Jinzhi/Second_Jinzhi.iml" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/jinzhi/src/jinzhi2.java" beforeDir="false" afterPath="$PROJECT_DIR$/Second_Jinzhi/src/jinzhi2.java" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/jisuan/First_Jisuan.iml" beforeDir="false" afterPath="$PROJECT_DIR$/First_Jisuan/First_Jisuan.iml" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/jisuan/src/Main.java" beforeDir="false" afterPath="$PROJECT_DIR$/First_Jisuan/src/Main.java" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/jisuan/src/jisuan1.java" beforeDir="false" afterPath="$PROJECT_DIR$/First_Jisuan/src/jisuan1.java" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -27,6 +25,12 @@
</option>
</component>
<component name="Git.Settings">
+ <option name="PUSH_TAGS">
+ <GitPushTagMode>
+ <option name="argument" value="--tags" />
+ <option name="title" value="All" />
+ </GitPushTagMode>
+ </option>
<option name="RECENT_BRANCH_BY_REPOSITORY">
<map>
<entry key="$PROJECT_DIR$" value="main" />
@@ -44,17 +48,17 @@
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
- <component name="PropertiesComponent"><![CDATA[{
- "keyToString": {
- "Application.JinZhi.executor": "Run",
- "Application.jinzhi2.executor": "Run",
- "Application.mm.executor": "Run",
- "RunOnceActivity.ShowReadmeOnStart": "true",
- "SHARE_PROJECT_CONFIGURATION_FILES": "true",
- "git-widget-placeholder": "master",
- "kotlin-language-version-configured": "true"
+ <component name="PropertiesComponent">{
+ &quot;keyToString&quot;: {
+ &quot;Application.JinZhi.executor&quot;: &quot;Run&quot;,
+ &quot;Application.jinzhi2.executor&quot;: &quot;Run&quot;,
+ &quot;Application.mm.executor&quot;: &quot;Run&quot;,
+ &quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
+ &quot;SHARE_PROJECT_CONFIGURATION_FILES&quot;: &quot;true&quot;,
+ &quot;git-widget-placeholder&quot;: &quot;master&quot;,
+ &quot;kotlin-language-version-configured&quot;: &quot;true&quot;
}
-}]]></component>
+}</component>
<component name="RunManager" selected="Application.jinzhi2">
<configuration name="JinZhi" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="JinZhi" />
@@ -86,6 +90,19 @@
<option name="presentableId" value="Default" />
<updated>1728559103908</updated>
</task>
+ <task id="LOCAL-00001" summary="第二题修改">
+ <option name="closed" value="true" />
+ <created>1729153009506</created>
+ <option name="number" value="00001" />
+ <option name="presentableId" value="LOCAL-00001" />
+ <option name="project" value="LOCAL" />
+ <updated>1729153009506</updated>
+ </task>
+ <option name="localTasksCounter" value="2" />
<servers />
</component>
+ <component name="VcsManagerConfiguration">
+ <MESSAGE value="第二题修改" />
+ <option name="LAST_COMMIT_MESSAGE" value="第二题修改" />
+ </component>
</project>
\ No newline at end of file
diff --git a/jisuan/First_Jisuan.iml b/First_Jisuan/First_Jisuan.iml
rename from jisuan/First_Jisuan.iml
rename to First_Jisuan/First_Jisuan.iml
diff --git a/jisuan/src/jisuan1.java b/First_Jisuan/src/jisuan1.java
rename from jisuan/src/jisuan1.java
rename to First_Jisuan/src/jisuan1.java
diff --git a/jinzhi/Second_Jinzhi.iml b/Second_Jinzhi/Second_Jinzhi.iml
rename from jinzhi/Second_Jinzhi.iml
rename to Second_Jinzhi/Second_Jinzhi.iml

@ -1,4 +0,0 @@
<changelist name="Uncommitted_changes_before_Update_at_2024_10_17_16_25_[Changes]" date="1729153537863" recycled="true" deleted="true">
<option name="PATH" value="$PROJECT_DIR$/.idea/shelf/Uncommitted_changes_before_Update_at_2024_10_17_16_25_[Changes]/shelved.patch" />
<option name="DESCRIPTION" value="Uncommitted changes before Update at 2024/10/17 16:25 [Changes]" />
</changelist>

@ -1,124 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Palette2">
<group name="Swing">
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
</item>
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
</item>
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.svg" removable="false" auto-create-binding="false" can-attach-label="true">
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
</item>
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
<initial-values>
<property name="text" value="Button" />
</initial-values>
</item>
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="RadioButton" />
</initial-values>
</item>
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="CheckBox" />
</initial-values>
</item>
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
<initial-values>
<property name="text" value="Label" />
</initial-values>
</item>
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
</item>
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
</item>
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
<preferred-size width="-1" height="20" />
</default-constraints>
</item>
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
</item>
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
</item>
</group>
</component>
</project>

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
<mapping directory="$PROJECT_DIR$/First_Jisuan1" vcs="Git" />
<mapping directory="" vcs="Git" />
</component>
</project>

@ -1,153 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="AutoImportSettings">
<option name="autoReloadType" value="SELECTIVE" />
</component>
<component name="ChangeListManager">
<list default="true" id="240004e1-ef35-41dc-944d-01a893c69670" name="Changes" comment="第二次第一题">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/First_Jisuan1/src/jisuan1.java" beforeDir="false" afterPath="$PROJECT_DIR$/First_Jisuan1/src/jisuan1.java" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="FileTemplateManagerImpl">
<option name="RECENT_TEMPLATES">
<list>
<option value="Class" />
</list>
</option>
</component>
<component name="Git.Settings">
<option name="PUSH_TAGS">
<GitPushTagMode>
<option name="argument" value="--tags" />
<option name="title" value="All" />
</GitPushTagMode>
</option>
<option name="RECENT_BRANCH_BY_REPOSITORY">
<map>
<entry key="$PROJECT_DIR$" value="main" />
</map>
</option>
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$/First_Jisuan1" />
</component>
<component name="ProjectColorInfo">{
&quot;associatedIndex&quot;: 5
}</component>
<component name="ProjectId" id="2nFBmc5uTbrylp6kD7GKdOhgrTY" />
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
<component name="ProjectViewState">
<option name="autoscrollFromSource" value="true" />
<option name="flattenPackages" value="true" />
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent"><![CDATA[{
"keyToString": {
"Application.JinZhi.executor": "Run",
"Application.jinzhi2.executor": "Run",
"Application.jisuan1.executor": "Run",
"Application.mm.executor": "Run",
"RunOnceActivity.ShowReadmeOnStart": "true",
"SHARE_PROJECT_CONFIGURATION_FILES": "true",
"git-widget-placeholder": "master",
"kotlin-language-version-configured": "true",
"last_opened_file_path": "D:/Git/chen/pan/First_Jisuan1"
}
}]]></component>
<component name="RunManager" selected="Application.jisuan1">
<configuration name="JinZhi" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="JinZhi" />
<module name="Second_Jinzhi" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="jinzhi2" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="jinzhi2" />
<module name="Second_Jinzhi" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="jisuan1" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="jisuan1" />
<module name="First_Jisuan1" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration default="true" type="JetRunConfigurationType">
<module name="First_Jisuan1" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration default="true" type="KotlinStandaloneScriptRunConfigurationType">
<module name="First_Jisuan1" />
<option name="filePath" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<recent_temporary>
<list>
<item itemvalue="Application.jisuan1" />
<item itemvalue="Application.jinzhi2" />
<item itemvalue="Application.JinZhi" />
</list>
</recent_temporary>
</component>
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="240004e1-ef35-41dc-944d-01a893c69670" name="Changes" comment="" />
<created>1728559103908</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1728559103908</updated>
</task>
<task id="LOCAL-00001" summary="第二题修改">
<option name="closed" value="true" />
<created>1729153009506</created>
<option name="number" value="00001" />
<option name="presentableId" value="LOCAL-00001" />
<option name="project" value="LOCAL" />
<updated>1729153009506</updated>
</task>
<task id="LOCAL-00002" summary="第二次第一题">
<option name="closed" value="true" />
<created>1729154083758</created>
<option name="number" value="00002" />
<option name="presentableId" value="LOCAL-00002" />
<option name="project" value="LOCAL" />
<updated>1729154083758</updated>
</task>
<task id="LOCAL-00003" summary="第二次第一题">
<option name="closed" value="true" />
<created>1729154360262</created>
<option name="number" value="00003" />
<option name="presentableId" value="LOCAL-00003" />
<option name="project" value="LOCAL" />
<updated>1729154360262</updated>
</task>
<task id="LOCAL-00004" summary="第二次第一题">
<option name="closed" value="true" />
<created>1729154493326</created>
<option name="number" value="00004" />
<option name="presentableId" value="LOCAL-00004" />
<option name="project" value="LOCAL" />
<updated>1729154493326</updated>
</task>
<option name="localTasksCounter" value="5" />
<servers />
</component>
<component name="VcsManagerConfiguration">
<MESSAGE value="第二题修改" />
<MESSAGE value="第二次第一题" />
<option name="LAST_COMMIT_MESSAGE" value="第二次第一题" />
</component>
</project>

@ -0,0 +1,2 @@
# pan

@ -1,209 +0,0 @@
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.ArrayList;
import java.util.Locale;
import javax.swing.JButton;
import javax.swing.JComponent;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JTextField;
//进制转换工具
@SuppressWarnings("serial")
public class jinzhi2 extends JFrame {
public jinzhi2() {
}
public void init() {
setContenpane();
actionListen();
mainFrame();
}
//图形化界面函数
public void mainFrame() {
//设置窗口的参数
setBounds(500,50,530,500);
//禁用重新调整窗口大小的功能
setResizable(false);
//关闭窗口的右上角的叉的同时关闭程序
setDefaultCloseOperation(EXIT_ON_CLOSE);
//设置窗口上当前程序的名字
setTitle("第二题进制转换");
//清除默认的布局管理器
getContentPane().setLayout(null);
//设置窗口显示
setVisible(true);
}
//控件
JTextField jt1, jt2, jt3, answer_text;
JLabel jl1, jl2, jl3, answer, help, tips;
JButton button;
//控件集合,方便修改字体等
ArrayList<JComponent> list_conponent = new ArrayList<>();
//放置控件
public void setContenpane() {
//文本输入框
jt1 = new JTextField();
jt2 = new JTextField();
jt3 = new JTextField();
answer_text = new JTextField();
jt1.setBounds(120, 30, 120, 40);
jt2.setBounds(120, 100, 120, 40);
jt3.setBounds(120, 170, 120, 40);
answer_text.setBounds(300, 170, 200, 40);
list_conponent.add(jt1);
list_conponent.add(jt2);
list_conponent.add(jt3);
list_conponent.add(answer_text);
getContentPane().add(jt1);
getContentPane().add(jt2);
getContentPane().add(jt3);
getContentPane().add(answer_text);
//标签
jl1 = new JLabel("输入数据:");
jl2 = new JLabel("输入进制:");
jl3 = new JLabel("转换进制:");
answer = new JLabel("转换结果:");
help = new JLabel("若结果不显示则表示数据过大无法显示!");
tips = new JLabel("本程序提供 1-36 进制互转数据支持int(过大无效)");
jl1.setBounds(20, 30, 100, 40);
jl2.setBounds(20, 100, 100, 40);
jl3.setBounds(20, 170, 100, 40);
answer.setBounds(300, 120, 200, 60);
help.setBounds(280, 30, 220, 30);
tips.setBounds(20, 240, 350, 30);
list_conponent.add(jl1);
list_conponent.add(jl2);
list_conponent.add(jl3);
list_conponent.add(answer);
//help不存入集合
//tips不存入集合
getContentPane().add(jl1);
getContentPane().add(jl2);
getContentPane().add(jl3);
getContentPane().add(answer);
getContentPane().add(help);
getContentPane().add(tips);
//按钮
button = new JButton("转换");
button.setBounds(300, 70, 80, 35);
list_conponent.add(button);
getContentPane().add(button);
//字体
for(JComponent jc:list_conponent) {
jc.setFont(new Font("黑体",Font.BOLD,20));
}
}
//事件监听函数
public void actionListen() {
button.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
//获取左边三个文本输入框内容
String a = jt1.getText();
int b = Integer.parseInt(jt2.getText());
int c = Integer.parseInt(jt3.getText());
//判断文本输入框内容是否合法(第一个)
char[] chars = a.toCharArray();
int len = chars.length;
for (int i = 0; i < len; i++) {
if(chars[i] < 48 || chars[i] > 57){
if(chars[i] < 65 || chars[i] > 90){
//首个位置可以是符号位,但是只能是 '-' '+'
if(i == 0){
if(chars[0] != '-' && chars[0] != '+'){
answer.setText("输入数据有误");
answer_text.setText("NULL");
return;
}
}else {
answer.setText("输入数据有误");
answer_text.setText("NULL");
return;
}
}
}
}
//需要判断一下所给类型是否合法,判断输入数据中的最大字符。
//第二个文本输入框与第三个文本输入框的进制是否合法
int maxChar = 1;
for (char t : chars) {
//ASCII转换,本来分别是 -48 -55,但是因为是进制类型故需要加一
//(例:最大字符为 '0' 时,最小为 '1' 进制;
// 最大字符为 '9' 时,最小为 '10' 进制;
// 最大字符为 'F' 时,最小为 '16'进制)
if(t < 57){
maxChar = Math.max(maxChar, t - 47);
}else{
maxChar = Math.max(maxChar, t - 54);
}
}
if(b < 1 || b > 36 || maxChar > b || c < 1 || c >36) {
answer.setText("输入进制有误");
answer_text.setText("NULL");
return;
}
//转换结果
int model_num;
String sum;
if(b != c){
//将其他进制数据转换为10进制
model_num = Integer.parseInt(a, b);
//将10进制数据转换为其他进制 转换为大写字母
sum = Integer.toString(model_num, c).toUpperCase(Locale.ROOT);
answer.setText("转换结果:");
answer_text.setText(sum);
return;
}else{
//原进制与所需进制相同无需转换
answer.setText("转换结果:");
answer_text.setText(a);
return;
}
}
});
}
//主函数
public static void main(String[] args) {
new jinzhi2().init();
}
}

@ -5,7 +5,7 @@
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

@ -0,0 +1,5 @@
public class Main {
public static void main(String[] args) {
System.out.println("Hello world!");
}
}

@ -3,7 +3,7 @@ import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public class jisuan1{
public class jisuan{
public static void main(String[] args) {
JS win=new JS();
}
@ -16,7 +16,7 @@ class JS extends JFrame implements ActionListener{
int i;
public JS()
{
setBounds(100,100,410,410);
setBounds(100,100,400,400);
setTitle("计算器");
this.setLayout(new BorderLayout());
JPanel p1=new JPanel();
@ -208,4 +208,4 @@ class JS extends JFrame implements ActionListener{
text.setText(sBuilder.toString());
}
}
}
}

Binary file not shown.

Binary file not shown.
Loading…
Cancel
Save