Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
J
JTankTrouble
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
9831111
JTankTrouble
Commits
afd9f837
Commit
afd9f837
authored
Jul 22, 2020
by
9831111
🙂
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add signUpUser method.
parent
178d1ccf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
3 deletions
+15
-3
JTankTrouble.iml
JTankTrouble.iml
+2
-3
LoginFrame.java
src/LoginFrame.java
+13
-0
No files found.
JTankTrouble.iml
View file @
afd9f837
<?xml version="1.0" encoding="UTF-8"?>
<module
type=
"JAVA_MODULE"
version=
"4"
>
<component
name=
"NewModuleRootManager"
inherit-compiler-output=
"true"
>
<component
name=
"NewModuleRootManager"
LANGUAGE_LEVEL=
"JDK_1_9"
inherit-compiler-output=
"true"
>
<exclude-output
/>
<content
url=
"file://$MODULE_DIR$"
>
<sourceFolder
url=
"file://$MODULE_DIR$/src"
isTestSource=
"false"
/>
...
...
@@ -8,5 +8,4 @@
<orderEntry
type=
"inheritedJdk"
/>
<orderEntry
type=
"sourceFolder"
forTests=
"false"
/>
</component>
</module>
</module>
\ No newline at end of file
src/LoginFrame.java
View file @
afd9f837
...
...
@@ -65,5 +65,18 @@ public class LoginFrame extends JFrame {
}
public
void
signUpUser
(
File
accounts
)
{
try
(
FileWriter
fileWriter
=
new
FileWriter
(
accounts
,
true
))
{
fileWriter
.
write
(
userName
.
getText
()
+
" "
+
passwordField
.
getText
()
+
" "
+
remindMe
.
isSelected
()
+
" 0 0 0 0 0 "
+
"\n"
);
JFrame
signUpMessage
=
new
JFrame
();
ImageIcon
icon
=
new
ImageIcon
(
"pictures/logo.png"
);
JOptionPane
.
showMessageDialog
(
signUpMessage
,
"Successfully registered."
,
""
,
JOptionPane
.
INFORMATION_MESSAGE
,
icon
);
}
catch
(
Exception
ex
)
{
System
.
out
.
println
(
"No account found ! "
);
ex
.
printStackTrace
();
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment