Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FUCoin
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
DistributedSystems4Students
FUCoin
Commits
c6edc0f9
Commit
c6edc0f9
authored
9 years ago
by
Luca Keidel
Browse files
Options
Downloads
Patches
Plain Diff
Made wallet gui a bit prettier
parent
fff02396
No related branches found
No related tags found
1 merge request
!3
Preliminary result of the software
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/fucoin/MainRemote.java
+9
-4
9 additions, 4 deletions
src/main/java/fucoin/MainRemote.java
src/main/java/fucoin/gui/WalletGuiControlImpl.java
+17
-2
17 additions, 2 deletions
src/main/java/fucoin/gui/WalletGuiControlImpl.java
with
26 additions
and
6 deletions
src/main/java/fucoin/MainRemote.java
+
9
−
4
View file @
c6edc0f9
...
@@ -16,7 +16,6 @@ import scala.concurrent.Await;
...
@@ -16,7 +16,6 @@ import scala.concurrent.Await;
import
javax.swing.*
;
import
javax.swing.*
;
public
class
MainRemote
{
public
class
MainRemote
{
public
static
ActorRef
remoteSuperVisorActor
;
private
static
JTextField
walletNameField
=
new
JTextField
(
5
);
private
static
JTextField
walletNameField
=
new
JTextField
(
5
);
private
static
JTextField
pathField
=
new
JTextField
(
5
);
private
static
JTextField
pathField
=
new
JTextField
(
5
);
...
@@ -53,12 +52,18 @@ public class MainRemote {
...
@@ -53,12 +52,18 @@ public class MainRemote {
path
=
pathField
.
getText
();
path
=
pathField
.
getText
();
}
}
// terminate if user clicked abort
// check input
if
(
path
==
null
)
{
if
(
result
==
JOptionPane
.
OK_OPTION
&&
(
path
.
equals
(
""
)
||
walletName
.
equals
(
""
))){
continue
;
}
// terminate if user clicked cancel
if
(
result
==
JOptionPane
.
CANCEL_OPTION
)
{
system
.
terminate
();
system
.
terminate
();
return
;
}
}
//
tell the node that we want to join the network
//
resolve the given address
ActorSelection
selection
=
system
.
actorSelection
(
path
);
ActorSelection
selection
=
system
.
actorSelection
(
path
);
try
{
try
{
...
...
This diff is collapsed.
Click to expand it.
src/main/java/fucoin/gui/WalletGuiControlImpl.java
+
17
−
2
View file @
c6edc0f9
...
@@ -14,7 +14,7 @@ public class WalletGuiControlImpl implements WalletGuiControl {
...
@@ -14,7 +14,7 @@ public class WalletGuiControlImpl implements WalletGuiControl {
private
JFrame
window
=
new
JFrame
(
"test"
);
private
JFrame
window
=
new
JFrame
(
"test"
);
private
JPanel
topPanel
=
new
JPanel
();
private
JPanel
topPanel
=
new
JPanel
();
private
J
Label
lblMyAddress
=
new
J
Lab
el
(
"My
Address:
"
);
private
J
TextField
txtMyName
=
new
J
TextFi
el
d
(
"
<
My
Name>
"
);
private
JTextField
txtMyAddress
=
new
JTextField
(
"<MyAddress>"
);
private
JTextField
txtMyAddress
=
new
JTextField
(
"<MyAddress>"
);
private
JLabel
lblMyAmount
=
new
JLabel
(
"My FUCs: "
);
private
JLabel
lblMyAmount
=
new
JLabel
(
"My FUCs: "
);
private
JLabel
txtMyAmount
=
new
JLabel
(
" <MyFUCs>"
);
private
JLabel
txtMyAmount
=
new
JLabel
(
" <MyFUCs>"
);
...
@@ -40,7 +40,22 @@ public class WalletGuiControlImpl implements WalletGuiControl {
...
@@ -40,7 +40,22 @@ public class WalletGuiControlImpl implements WalletGuiControl {
// Row 1
// Row 1
JPanel
row1
=
new
JPanel
();
JPanel
row1
=
new
JPanel
();
row1
.
setLayout
(
new
BoxLayout
(
row1
,
BoxLayout
.
PAGE_AXIS
));
row1
.
setLayout
(
new
BoxLayout
(
row1
,
BoxLayout
.
PAGE_AXIS
));
row1
.
add
(
lblMyAddress
);
txtMyName
.
setHorizontalAlignment
(
JTextField
.
CENTER
);
txtMyName
.
setBorder
(
BorderFactory
.
createEmptyBorder
());
txtMyName
.
setFont
(
txtMyName
.
getFont
().
deriveFont
(
18
f
).
deriveFont
(
Font
.
BOLD
));
txtMyName
.
setEditable
(
false
);
txtMyName
.
setForeground
(
Color
.
WHITE
);
txtMyName
.
setBackground
(
new
Color
(
123
,
94
,
167
));
txtMyName
.
setText
(
wallet
.
getName
());
txtMyAddress
.
setHorizontalAlignment
(
JTextField
.
CENTER
);
txtMyAddress
.
setBorder
(
BorderFactory
.
createEmptyBorder
());
txtMyAddress
.
setEditable
(
false
);
txtMyAddress
.
setForeground
(
Color
.
WHITE
);
txtMyAddress
.
setBackground
(
new
Color
(
137
,
112
,
176
));
row1
.
add
(
txtMyName
);
row1
.
add
(
txtMyAddress
);
row1
.
add
(
txtMyAddress
);
topPanel
.
add
(
row1
);
topPanel
.
add
(
row1
);
// Row 2
// Row 2
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment